From 6ea359435d364d324d597f630a87b86521f9668c Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Mon, 29 May 2017 12:00:47 -0700 Subject: [PATCH] redesign anchors --- assets/js/src/application.js | 6 ++++-- assets/scss/_anchor.scss | 24 ++++++------------------ 2 files changed, 10 insertions(+), 20 deletions(-) diff --git a/assets/js/src/application.js b/assets/js/src/application.js index b98c3a5ea1..e1b9721a05 100644 --- a/assets/js/src/application.js +++ b/assets/js/src/application.js @@ -103,6 +103,8 @@ ;(function () { 'use strict' - anchors.options.placement = 'left' - anchors.add('.bd-content > h1, .bd-content > h2, .bd-content > h3, .bd-content > h4, .bd-content > h5') + anchors.options = { + icon: '#' + } + anchors.add('.bd-content > h2, .bd-content > h3, .bd-content > h4, .bd-content > h5') }()) diff --git a/assets/scss/_anchor.scss b/assets/scss/_anchor.scss index 5b4edf04d8..d0a9043e95 100644 --- a/assets/scss/_anchor.scss +++ b/assets/scss/_anchor.scss @@ -1,24 +1,12 @@ // scss-lint:disable ImportantRule .anchorjs-link { - padding-right: .25em !important; - margin-left: -.75em !important; - color: inherit; -} + font-weight: normal; + color: rgba($link-color, .5); + transition: color .16s linear; -@media (max-width: 480px) { - .anchorjs-link { - display: none; + &:hover { + color: $link-color; + text-decoration: none; } } - -*:hover > .anchorjs-link { - opacity: .75; - transition: color .16s linear; -} - -*:hover > .anchorjs-link:hover, -.anchorjs-link:focus { - text-decoration: none; - opacity: 1; -}