]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
redesign anchors
authorMark Otto <markdotto@gmail.com>
Mon, 29 May 2017 19:00:47 +0000 (12:00 -0700)
committerMark Otto <markd.otto@gmail.com>
Tue, 30 May 2017 06:32:28 +0000 (23:32 -0700)
assets/js/src/application.js
assets/scss/_anchor.scss

index b98c3a5ea142783f7de862f3e3d06e81e47df339..e1b9721a05393407a378ebb200347fddb2a271ac 100644 (file)
 ;(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')
 }())
index 5b4edf04d8b28309be25f55b1447b04843c41bdf..d0a9043e95b729d6cb102fa9c3c44e0284df47cf 100644 (file)
@@ -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;
+  }
 }