From: Mark Otto Date: Mon, 29 May 2017 19:00:47 +0000 (-0700) Subject: redesign anchors X-Git-Tag: v4.0.0-beta~187^2~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6ea359435d364d324d597f630a87b86521f9668c;p=thirdparty%2Fbootstrap.git redesign anchors --- 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; -} - -@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; + } }