Skip to content

Commit 09ae92a

Browse files
m5omdo
authored andcommitted
descriptive docs variable naming (#24521)
* use descriptive docs btn naming * rename `btn-bd-yellow` to `btn-bd-download` * sort state vars * sort state vars * info, warning, danger * rename btn-bd-purple * rename `.btn-bd-purple` to `.btn-bd-primary` * align docs color variables * generate $bd-purple-light color * with http://razorltd.github.io/sasscolourfunctioncalculator/ * allow overide of docs variables
1 parent 20b2e67 commit 09ae92a

File tree

5 files changed

+19
-19
lines changed

5 files changed

+19
-19
lines changed

_includes/docs-navbar.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,5 +59,5 @@
5959
</li>
6060
</ul>
6161

62-
<a class="btn btn-bd-yellow d-none d-lg-inline-block mb-3 mb-md-0 ml-md-3" href="{{ site.download.source }}">Download</a>
62+
<a class="btn btn-bd-download d-none d-lg-inline-block mb-3 mb-md-0 ml-md-3" href="{{ site.download.source }}">Download</a>
6363
</header>

assets/scss/_buttons.scss

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//
33
// Custom buttons for the docs.
44

5-
.btn-bd-purple {
5+
.btn-bd-primary {
66
font-weight: 500;
77
color: $bd-purple-bright;
88
border-color: $bd-purple-bright;
@@ -15,15 +15,15 @@
1515
}
1616
}
1717

18-
.btn-bd-yellow {
18+
.btn-bd-download {
1919
font-weight: 500;
20-
color: $bd-yellow;
21-
border-color: $bd-yellow;
20+
color: $bd-download;
21+
border-color: $bd-download;
2222

2323
&:hover,
2424
&:active {
25-
color: $bd-graphite;
26-
background-color: $bd-yellow;
27-
border-color: $bd-yellow;
25+
color: $bd-dark;
26+
background-color: $bd-download;
27+
border-color: $bd-download;
2828
}
2929
}

assets/scss/_variables.scss

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
// Local docs variables
2-
$bd-purple: #563d7c;
3-
$bd-purple-bright: lighten(saturate($bd-purple, 5%), 15%);
4-
$bd-purple-light: #cdbfe3;
5-
$bd-graphite: #2a2730;
6-
$bd-yellow: #ffe484;
7-
$bd-danger: #d9534f;
8-
$bd-warning: #f0ad4e;
9-
$bd-info: #5bc0de;
2+
$bd-purple: #563d7c !default;
3+
$bd-purple-bright: lighten(saturate($bd-purple, 5%), 15%) !default;
4+
$bd-purple-light: lighten(saturate($bd-purple, 5%), 45%) !default;
5+
$bd-dark: #2a2730 !default;
6+
$bd-download: #ffe484 !default;
7+
$bd-info: #5bc0de !default;
8+
$bd-warning: #f0ad4e !default;
9+
$bd-danger: #d9534f !default;

docs/4.0/getting-started/download.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Download ready-to-use compiled code for **Bootstrap v{{ site.current_version}}**
1515

1616
This doesn't include documentation, source files, or any optional JavaScript dependencies (jQuery and Popper.js).
1717

18-
<a href="{{ site.download.dist }}" class="btn btn-bd-purple" onclick="ga('send', 'event', 'Getting started', 'Download', 'Download Bootstrap');">Download</a>
18+
<a href="{{ site.download.dist }}" class="btn btn-bd-primary" onclick="ga('send', 'event', 'Getting started', 'Download', 'Download Bootstrap');">Download</a>
1919

2020
## Source files
2121

@@ -26,7 +26,7 @@ Compile Bootstrap with your own asset pipeline by downloading our source Sass, J
2626

2727
Should you require [build tools]({{ site.baseurl }}/docs/{{ site.docs_version }}/getting-started/build-tools/#tooling-setup), they are included for developing Bootstrap and its docs, but they're likely unsuitable for your own purposes.
2828

29-
<a href="{{ site.download.source }}" class="btn btn-bd-purple" onclick="ga('send', 'event', 'Getting started', 'Download', 'Download source');">Download source</a>
29+
<a href="{{ site.download.source }}" class="btn btn-bd-primary" onclick="ga('send', 'event', 'Getting started', 'Download', 'Download source');">Download source</a>
3030

3131
## Bootstrap CDN
3232

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ <h1 class="mb-3 bd-text-purple-bright">Bootstrap</h1>
1717
Bootstrap is an open source toolkit for developing with HTML, CSS, and JS. Quickly prototype your ideas or build your entire app with our Sass variables and mixins, responsive grid system, extensive prebuilt components, and powerful plugins built on jQuery.
1818
</p>
1919
<div class="d-flex flex-column flex-md-row lead mb-3">
20-
<a href="{{ site.baseurl }}/docs/{{ site.docs_version }}/getting-started/introduction/" class="btn btn-lg btn-bd-purple mb-3 mb-md-0 mr-md-3" onclick="ga('send', 'event', 'Jumbotron actions', 'Get started', 'Get started');">Get started</a>
20+
<a href="{{ site.baseurl }}/docs/{{ site.docs_version }}/getting-started/introduction/" class="btn btn-lg btn-bd-primary mb-3 mb-md-0 mr-md-3" onclick="ga('send', 'event', 'Jumbotron actions', 'Get started', 'Get started');">Get started</a>
2121
<a href="{{ site.baseurl }}/docs/{{ site.docs_version }}/getting-started/download/" class="btn btn-lg btn-outline-secondary" onclick="ga('send', 'event', 'Jumbotron actions', 'Download', 'Download {{ site.current_version }}');">Download</a>
2222
</div>
2323
<p class="text-muted mb-0">

0 commit comments

Comments
 (0)