From 3bff97c7d2b1f2a56b824f3eeeb9e93db5e96c88 Mon Sep 17 00:00:00 2001 From: Pierre-Denis Vanduynslager Date: Sat, 21 Jan 2017 17:25:16 -0500 Subject: [PATCH 01/36] Fix active nav-link for nav markup --- scss/_nav.scss | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/scss/_nav.scss b/scss/_nav.scss index eb316bb27b33..ab4e8c6d7b76 100644 --- a/scss/_nav.scss +++ b/scss/_nav.scss @@ -18,6 +18,12 @@ text-decoration: none; } + &.active { + color: $nav-pills-active-link-color; + cursor: default; + background-color: $nav-pills-active-link-bg; + } + // Disabled state lightens text and removes hover/tab effects &.disabled { color: $nav-disabled-link-color; @@ -76,13 +82,6 @@ .nav-link { @include border-radius($nav-pills-border-radius); } - - .nav-link.active, - .nav-item.show .nav-link { - color: $nav-pills-active-link-color; - cursor: default; - background-color: $nav-pills-active-link-bg; - } } From 9fe3960b5b3c79c5c6431b19f9d64989c4f62fe6 Mon Sep 17 00:00:00 2001 From: Pierre-Denis Vanduynslager Date: Sat, 21 Jan 2017 17:25:44 -0500 Subject: [PATCH 02/36] Fix nav-justified for nav markup --- scss/_nav.scss | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scss/_nav.scss b/scss/_nav.scss index ab4e8c6d7b76..8d00891b965e 100644 --- a/scss/_nav.scss +++ b/scss/_nav.scss @@ -97,7 +97,8 @@ } .nav-justified { - .nav-item { + .nav-item, + .nav-link { flex: 1 1 100%; text-align: center; } From 5b471f283b5e5c2d597e07cdebf9459de8b56c05 Mon Sep 17 00:00:00 2001 From: Pierre-Denis Vanduynslager Date: Sat, 21 Jan 2017 17:26:00 -0500 Subject: [PATCH 03/36] Fix nav-fill for nav markup --- scss/_nav.scss | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scss/_nav.scss b/scss/_nav.scss index 8d00891b965e..c51412595a32 100644 --- a/scss/_nav.scss +++ b/scss/_nav.scss @@ -90,7 +90,8 @@ // .nav-fill { - .nav-item { + .nav-item, + .nav-link { flex: 1 1 auto; text-align: center; } From df3dfc24a8a83ebd88cd5f0177f0583e96181782 Mon Sep 17 00:00:00 2001 From: Pierre-Denis Vanduynslager Date: Sat, 21 Jan 2017 17:26:31 -0500 Subject: [PATCH 04/36] Add flex-fill utility that is referenced in the doc but not implemented --- scss/utilities/_flex.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/scss/utilities/_flex.scss b/scss/utilities/_flex.scss index 1b98aaa3fa8b..0325b1761718 100644 --- a/scss/utilities/_flex.scss +++ b/scss/utilities/_flex.scss @@ -18,6 +18,7 @@ .flex#{$infix}-wrap { flex-wrap: wrap !important; } .flex#{$infix}-nowrap { flex-wrap: nowrap !important; } .flex#{$infix}-wrap-reverse { flex-wrap: wrap-reverse !important; } + .flex#{$infix}-fill { flex: 1 1 auto; } .justify-content#{$infix}-start { justify-content: flex-start !important; } .justify-content#{$infix}-end { justify-content: flex-end !important; } From 536aefee41266e3df07985aeebde752613a6d21a Mon Sep 17 00:00:00 2001 From: Pierre-Denis Vanduynslager Date: Sat, 21 Jan 2017 17:26:54 -0500 Subject: [PATCH 05/36] Add font-size utility used in the scroll spy docs --- scss/utilities/_text.scss | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scss/utilities/_text.scss b/scss/utilities/_text.scss index 4ac90533acb9..1ec98fc4c9f4 100644 --- a/scss/utilities/_text.scss +++ b/scss/utilities/_text.scss @@ -32,6 +32,12 @@ .font-weight-bold { font-weight: $font-weight-bold; } .font-italic { font-style: italic; } +// Size + +.font-size-sm { font-size: $font-size-sm; } +.font-size-normal { font-size: $font-size-sm; } +.font-size-lg { font-size: $font-size-lg; } + // Contextual colors .text-white { From 1aee9d124d93be09974397be736e1f403f38dedc Mon Sep 17 00:00:00 2001 From: Pierre-Denis Vanduynslager Date: Sat, 21 Jan 2017 17:28:22 -0500 Subject: [PATCH 06/36] =?UTF-8?q?Detect=20parent=20to=20activate=20for=20b?= =?UTF-8?q?oth=20ul=20and=20nav=20markup,=20independently=20of=20nav-item?= =?UTF-8?q?=20class=20or=20of=20the=20markup=20elements=20(li,=20nav,=20di?= =?UTF-8?q?v=20etc=E2=80=A6)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- js/src/scrollspy.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/js/src/scrollspy.js b/js/src/scrollspy.js index 66b6080c84f0..e231ad6e120e 100644 --- a/js/src/scrollspy.js +++ b/js/src/scrollspy.js @@ -256,9 +256,11 @@ const ScrollSpy = (($) => { $link.closest(Selector.DROPDOWN).find(Selector.DROPDOWN_TOGGLE).addClass(ClassName.ACTIVE) $link.addClass(ClassName.ACTIVE) } else { - // todo (fat) this is kinda sus... - // recursively add actives to tested nav-links - $link.parents(Selector.LI).find(`> ${Selector.NAV_LINKS}`).addClass(ClassName.ACTIVE) + // Set triggered link as active + $link.addClass(ClassName.ACTIVE) + // Set triggered links parents as active + // With both
    and
-
...
-
...
-
...
-
...
+
...
+
...
+
...
+
...
{% endhighlight %} @@ -481,17 +481,17 @@ And with vertical pills.
-
-

Cillum ad ut irure tempor velit nostrud occaecat ullamco aliqua anim Lorem sint. Veniam sint duis incididunt do esse magna mollit excepteur laborum qui. Id id reprehenderit sit est eu aliqua occaecat quis et velit excepteur laborum mollit dolore eiusmod. Ipsum dolor in occaecat commodo et voluptate minim reprehenderit mollit pariatur. Deserunt non laborum enim et cillum eu deserunt excepteur ea incididunt minim occaecat. Lorem aliquip non veniam fugiat minim eiusmod sit tempor magna velit.

+
+

Cillum ad ut irure tempor velit nostrud occaecat ullamco aliqua anim Lorem sint. Veniam sint duis incididunt do esse magna mollit excepteur laborum qui. Id id reprehenderit sit est eu aliqua occaecat quis et velit excepteur laborum mollit dolore eiusmod. Ipsum dolor in occaecat commodo et voluptate minim reprehenderit mollit pariatur. Deserunt non laborum enim et cillum eu deserunt excepteur ea incididunt minim occaecat.

-
-

Culpa dolor voluptate do laboris laboris irure reprehenderit id incididunt duis pariatur mollit aute magna pariatur consectetur. Eu veniam duis non ut dolor deserunt commodo et minim in quis laboris ipsum velit id veniam. Quis ut consectetur adipisicing officia excepteur non sit. Ut et elit aliquip labore Lorem enim eu. Ullamco mollit occaecat dolore ipsum id officia mollit qui esse anim eiusmod do sint minim consectetur qui. Proident esse fugiat cillum Lorem pariatur nostrud ut adipisicing in quis tempor ex labore labore.

+
+

Culpa dolor voluptate do laboris laboris irure reprehenderit id incididunt duis pariatur mollit aute magna pariatur consectetur. Eu veniam duis non ut dolor deserunt commodo et minim in quis laboris ipsum velit id veniam. Quis ut consectetur adipisicing officia excepteur non sit. Ut et elit aliquip labore Lorem enim eu. Ullamco mollit occaecat dolore ipsum id officia mollit qui esse anim eiusmod do sint minim consectetur qui.

-
-

Fugiat id quis dolor culpa eiusmod anim velit excepteur proident dolor aute qui magna. Ad proident laboris ullamco esse anim Lorem Lorem veniam quis Lorem irure occaecat velit nostrud magna nulla. Velit et et proident Lorem do ea tempor officia dolor. Reprehenderit Lorem aliquip labore est magna commodo est ea veniam consectetur. Qui aute dolor consequat amet ad enim culpa culpa eu tempor velit reprehenderit exercitation commodo ad incididunt cupidatat.

+
+

Fugiat id quis dolor culpa eiusmod anim velit excepteur proident dolor aute qui magna. Ad proident laboris ullamco esse anim Lorem Lorem veniam quis Lorem irure occaecat velit nostrud magna nulla. Velit et et proident Lorem do ea tempor officia dolor. Reprehenderit Lorem aliquip labore est magna commodo est ea veniam consectetur.

-
-

Eu dolore ea ullamco dolore Lorem id cupidatat excepteur reprehenderit consectetur elit id dolor proident in cupidatat officia. Voluptate excepteur commodo labore nisi cillum duis aliqua do. Aliqua amet qui mollit consectetur nulla mollit velit aliqua veniam nisi id do Lorem deserunt amet. Culpa ullamco sit adipisicing labore officia magna elit nisi in aute tempor commodo eiusmod. Qui laborum laborum culpa commodo eu eu eu sunt elit irure duis amet nulla est amet dolore.

+
+

Eu dolore ea ullamco dolore Lorem id cupidatat excepteur reprehenderit consectetur elit id dolor proident in cupidatat officia. Voluptate excepteur commodo labore nisi cillum duis aliqua do. Aliqua amet qui mollit consectetur nulla mollit velit aliqua veniam nisi id do Lorem deserunt amet. Culpa ullamco sit adipisicing labore officia magna elit nisi in aute tempor commodo eiusmod.

@@ -499,23 +499,17 @@ And with vertical pills.
{% highlight html %} -
-
- -
-
-
-
...
-
...
-
...
-
...
-
-
+ +
+
...
+
...
+
...
+
...
{% endhighlight %} diff --git a/docs/components/scrollspy.md b/docs/components/scrollspy.md index 002a7a2a2cc2..1c1184a90423 100644 --- a/docs/components/scrollspy.md +++ b/docs/components/scrollspy.md @@ -164,43 +164,38 @@ The ScrollSpy plugin also works with nested `.nav`s. If a sub-`.nav` is `.active
{% highlight html %} -
-
-
-
-
-

Item 1

-

...

-
Item 1-1
-

...

-
Item 2-2
-

...

-

Item 2

-

...

-

Item 3

-

...

-
Item 3-1
-

...

-
Item 3-2
-

...

-
-
+ Item2 + Item3 + + + + +
+

Item 1

+

...

+
Item 1-1
+

...

+
Item 2-2
+

...

+

Item 2

+

...

+

Item 3

+

...

+
Item 3-1
+

...

+
Item 3-2
+

...

{% endhighlight %} @@ -234,43 +229,37 @@ The ScrollSpy plugin also works with a `.list-group`. Scroll the area next to th
{% highlight html %} -
-
-
-
-
-

Item 1

-

...

-
Item 1-1
-

...

-
Item 2-2
-

...

-

Item 2

-

...

-

Item 3

-

...

-
Item 3-1
-

...

-
Item 3-2
-

...

-
-
+ Item2 + Item3 + + + +
+

Item 1

+

...

+
Item 1-1
+

...

+
Item 2-2
+

...

+

Item 2

+

...

+

Item 3

+

...

+
Item 3-1
+

...

+
Item 3-2
+

...

{% endhighlight %} diff --git a/js/tests/visual/scrollspy.html b/js/tests/visual/scrollspy.html index 15b7f75f8c3a..c0c3dc749135 100644 --- a/js/tests/visual/scrollspy.html +++ b/js/tests/visual/scrollspy.html @@ -10,10 +10,13 @@ -
-
+ +

@fat

Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.

Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.

diff --git a/js/tests/visual/tab.html b/js/tests/visual/tab.html index c676cc7bed82..e747302db4b4 100644 --- a/js/tests/visual/tab.html +++ b/js/tests/visual/tab.html @@ -71,7 +71,7 @@

Tabs with fade

-
+

Raw denim you probably haven't heard of them jean shorts Austin. Nesciunt tofu stumptown aliqua, retro synth master cleanse. Mustache cliche tempor, williamsburg carles vegan helvetica. Reprehenderit butcher retro keffiyeh dreamcatcher synth. Cosby sweater eu banh mi, qui irure terry richardson ex squid. Aliquip placeat salvia cillum iphone. Seitan aliquip quis cardigan american apparel, butcher voluptate nisi qui.

Raw denim you probably haven't heard of them jean shorts Austin. Nesciunt tofu stumptown aliqua, retro synth master cleanse. Mustache cliche tempor, williamsburg carles vegan helvetica. Reprehenderit butcher retro keffiyeh dreamcatcher synth. Cosby sweater eu banh mi, qui irure terry richardson ex squid. Aliquip placeat salvia cillum iphone. Seitan aliquip quis cardigan american apparel, butcher voluptate nisi qui.

@@ -178,7 +178,7 @@

Tabs with nav (with fade)

-
+

Raw denim you probably haven't heard of them jean shorts Austin. Nesciunt tofu stumptown aliqua, retro synth master cleanse. Mustache cliche tempor, williamsburg carles vegan helvetica. Reprehenderit butcher retro keffiyeh dreamcatcher synth. Cosby sweater eu banh mi, qui irure terry richardson ex squid. Aliquip placeat salvia cillum iphone. Seitan aliquip quis cardigan american apparel, butcher voluptate nisi qui.

Raw denim you probably haven't heard of them jean shorts Austin. Nesciunt tofu stumptown aliqua, retro synth master cleanse. Mustache cliche tempor, williamsburg carles vegan helvetica. Reprehenderit butcher retro keffiyeh dreamcatcher synth. Cosby sweater eu banh mi, qui irure terry richardson ex squid. Aliquip placeat salvia cillum iphone. Seitan aliquip quis cardigan american apparel, butcher voluptate nisi qui.

@@ -195,8 +195,35 @@

Tabs with nav (with fade)

Trust fund seitan letterpress, keytar raw denim keffiyeh etsy art party before they sold out master cleanse gluten-free squid scenester freegan cosby sweater. Fanny pack portland seitan DIY, art party locavore wolf cliche high life echo park Austin. Cred vinyl keffiyeh DIY salvia PBR, banh mi before they sold out farm-to-table VHS viral locavore cosby sweater. Lomo wolf viral, mustache readymade thundercats keffiyeh craft beer marfa ethical. Wolf salvia freegan, sartorial keffiyeh echo park vegan.

-
+

Tabs with list-group (with fade)

+
+
+ +
+
+ +
+
+
From 19966434c61bcf5e784625d0bffc558dc32dcb49 Mon Sep 17 00:00:00 2001 From: Pierre-Denis Vanduynslager Date: Thu, 30 Mar 2017 17:07:13 -0400 Subject: [PATCH 36/36] Fix copy/paste error in highlighted html (the actual code didn't change) --- docs/components/scrollspy.md | 40 +++++++++++------------------------- 1 file changed, 12 insertions(+), 28 deletions(-) diff --git a/docs/components/scrollspy.md b/docs/components/scrollspy.md index 1c1184a90423..c20c44ec867a 100644 --- a/docs/components/scrollspy.md +++ b/docs/components/scrollspy.md @@ -125,7 +125,7 @@ The ScrollSpy plugin also works with nested `.nav`s. If a sub-`.nav` is `.active
-
{% highlight html %} - -
-

Item 1

-

...

-
Item 1-1
-

...

-
Item 2-2
+ +
+

Item 1

...

-

Item 2

+

Item 2

...

-

Item 3

+

Item 3

...

-
Item 3-1
-

...

-
Item 3-2
+

Item 4

...

{% endhighlight %}