Skip to content

Commit 38f02e9

Browse files
committed
Merge pull request select2#3467 from fk/docs-update-anchorjs
docs: Update AnchorJS from v0.3.1 to 1.1.1.
2 parents 60a8772 + ebecea1 commit 38f02e9

5 files changed

Lines changed: 7 additions & 101 deletions

File tree

docs/_includes/head.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,4 @@
1616
<link href="dist/css/select2.min.css" type="text/css" rel="stylesheet" />
1717

1818
<link href="vendor/css/font-awesome.min.css" type="text/css" rel="stylesheet" />
19-
<link href="vendor/css/anchor.css" type="text/css" rel="stylesheet" />
2019
<link href="css/s2-docs.css" type="text/css" rel="stylesheet" >

docs/_layouts/default.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@
4747
(function () {
4848
'use strict';
4949

50-
addAnchors('.s2-docs-container h1, .s2-docs-container h2, .s2-docs-container h3, .s2-docs-container h4, .s2-docs-container h5');
50+
anchors.options.placement = 'left';
51+
anchors.add('.s2-docs-container h1, .s2-docs-container h2, .s2-docs-container h3, .s2-docs-container h4, .s2-docs-container h5');
5152
})();
5253
</script>
5354

docs/_sass/_anchorjs.scss

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,9 @@
11
// AnchorJS Styles
2-
//
3-
// Styles for AnchorJS elements following the Bootstrap docs styles.
4-
//
5-
// @see https://github.com/twbs/bootstrap/blob/master/docs/assets/css/src/docs.css#L1599
62

73
.anchorjs-link {
8-
float: left;
9-
width: 1em;
10-
height: 1em;
11-
margin-left: -1.2em;
12-
opacity: 0;
134
color: inherit;
14-
text-align: center;
5+
transition: all .16s linear;
6+
text-decoration: none;
157

168
&:link,
179
&:visited {
@@ -26,18 +18,10 @@
2618

2719
*:hover > .anchorjs-link {
2820
opacity: .5;
29-
-webkit-transition: all .16s linear;
30-
-o-transition: all .16s linear;
31-
transition: all .16s linear;
21+
margin-left: -0.9em !important;
3222
}
3323

3424
*:hover > .anchorjs-link:hover,
3525
.anchorjs-link:focus {
3626
opacity: 1;
3727
}
38-
39-
.anchorjs-icon {
40-
font-size: 60%;
41-
vertical-align: .2em;
42-
}
43-

docs/vendor/css/anchor.css

Lines changed: 0 additions & 78 deletions
This file was deleted.

docs/vendor/js/anchor.min.js

100644100755
Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)