diff options
| author | Mark Otto <[email protected]> | 2017-05-29 12:00:47 -0700 |
|---|---|---|
| committer | Mark Otto <[email protected]> | 2017-05-29 23:32:28 -0700 |
| commit | 6ea359435d364d324d597f630a87b86521f9668c (patch) | |
| tree | 07e94774fc6c19b7d73316d32a5c2b3eaa0accf9 /assets | |
| parent | 0ef7cb866e8eb3289470c57fe35d01f31a4c0e14 (diff) | |
| download | bootstrap-6ea359435d364d324d597f630a87b86521f9668c.tar.xz bootstrap-6ea359435d364d324d597f630a87b86521f9668c.zip | |
redesign anchors
Diffstat (limited to 'assets')
| -rw-r--r-- | assets/js/src/application.js | 6 | ||||
| -rw-r--r-- | 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 b98c3a5ea..e1b9721a0 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 5b4edf04d..d0a9043e9 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; -} - -@media (max-width: 480px) { - .anchorjs-link { - display: none; - } -} - -*:hover > .anchorjs-link { - opacity: .75; + font-weight: normal; + color: rgba($link-color, .5); transition: color .16s linear; -} -*:hover > .anchorjs-link:hover, -.anchorjs-link:focus { - text-decoration: none; - opacity: 1; + &:hover { + color: $link-color; + text-decoration: none; + } } |
