8000 Merge pull request #18257 from twbs/border-width-vars · liuwenye2010/bootstrap@c68019e · GitHub
[go: up one dir, main page]

Skip to content

Commit c68019e

Browse files
committed
Merge pull request twbs#18257 from twbs/border-width-vars
Add more border width variables
2 parents 1f487f7 + ca68331 commit c68019e

11 files changed

+40
-31
lines changed

scss/_custom-forms.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@
138138
background: #fff url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAUCAMAAACzvE1FAAAADFBMVEUzMzMzMzMzMzMzMzMKAG/3AAAAA3RSTlMAf4C/aSLHAAAAPElEQVR42q3NMQ4AIAgEQTn//2cLdRKppSGzBYwzVXvznNWs8C58CiussPJj8h6NwgorrKRdTvuV9v16Afn0AYFOB7aYAAAAAElFTkSuQmCC) no-repeat right .75rem center;
139139
background-image: none \9;
140140
background-size: 8px 10px;
141-
border: 1px solid $input-border;
141+
border: $input-border-width solid $input-border-color;
142142
// Use vendor prefixes as `appearance` isn't part of the CSS spec.
143143
-moz-appearance: none;
144144
-webkit-appearance: none;

scss/_dropdown.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
list-style: none;
5252
background-color: $dropdown-bg;
5353
background-clip: padding-box;
54-
border: 1px solid $dropdown-border;
54+
border: $dropdown-border-width solid $dropdown-border-color;
5555
@include border-radius($border-radius);
5656
@include box-shadow(0 6px 12px rgba(0,0,0,.175));
5757
}

scss/_forms.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
background-color: $input-bg;
1515
// Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214.
1616
background-image: none;
17-
border: $border-width solid $input-border;
17+
border: $input-border-width solid $input-border-color;
1818
// Note: This has no effect on <select>s in some browsers, due to the limited stylability of `<select>`s in CSS.
1919
@include border-radius($input-border-radius);
2020
@include box-shadow($input-box-shadow);

scss/_images.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
padding: $thumbnail-padding;
2020
line-height: $line-height;
2121
background-color: $thumbnail-bg;
22-
border: 1px solid $thumbnail-border;
22+
border: $thumbnail-border-width solid $thumbnail-border-color;
2323
border-radius: $thumbnail-border-radius;
2424
transition: all .2s ease-in-out;
2525
@include box-shadow(0 1px 2px rgba(0,0,0,.075));

scss/_list-group.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818
display: block;
1919
padding: .75rem 1.25rem;
2020
// Place the border on the list items and negative margin up for better styling
21-
margin-bottom: -$border-width;
21+
margin-bottom: -$list-group-border-width;
2222
background-color: $list-group-bg;
23-
border: $border-width solid $list-group-border;
23+
border: $list-group-border-width solid $list-group-border-color;
2424

2525
// Round the first and last items
2626
&:first-child {
@@ -34,7 +34,7 @@
3434

3535
.list-group-flush {
3636
.list-group-item {
37-
border-width: $border-width 0;
37+
border-width: $list-group-border-width 0;
3838
border-radius: 0;
3939
}
4040
}

scss/_nav.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
.nav-link {
6060
display: block;
6161
padding: $nav-link-padding;
62-
border: 1px solid transparent;
62+
border: $nav-tabs-link-border-width solid transparent;
6363
@include border-radius($border-radius $border-radius 0 0);
6464

6565
@include hover-focus {

scss/_pager.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
display: inline-block;
1515
padding: 5px 14px;
1616
background-color: $pager-bg;
17-
border: 1px solid $pager-border;
17+
border: $pager-border-width solid $pager-border-color;
1818
border-radius: $pager-border-radius;
1919
}
2020

scss/_pagination.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
color: $pagination-color;
1919
text-decoration: none;
2020
background-color: $pagination-bg;
21-
border: 1px solid $pagination-border;
21+
border: $pagination-border-width solid $pagination-border-color;
2222
}
2323
&:first-child {
2424
> a,

scss/_popover.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
font-size: $font-size-sm;
1313
background-color: $popover-bg;
1414
background-clip: padding-box;
15-
border: 1px solid $popover-border-color;
15+
border: $popover-border-width solid $popover-border-color;
1616
@include border-radius($border-radius-lg);
1717
@include box-shadow(0 5px 10px rgba(0,0,0,.2));
1818

@@ -107,7 +107,7 @@
107107
margin: 0; // reset heading margin
108108
font-size: $font-size-base;
109109
background-color: $popover-title-bg;
110-
border-bottom: 1px solid darken($popover-title-bg, 5%);
110+
border-bottom: $popover-border-width solid darken($popover-title-bg, 5%);
111111
@include border-radius(($border-radius-lg - 1) ($border-radius-lg - 1) 0 0);
112112
}
113113

scss/_tables.scss

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,16 @@
1212
padding: $table-cell-padding;
1313
line-height: $line-height;
1414
vertical-align: top;
15-
border-top: 1px solid $table-border-color;
15+
border-top: $table-border-width solid $table-border-color;
1616
}
1717

1818
thead th {
1919
vertical-align: bottom;
20-
border-bottom: 2px solid $table-border-color;
20+
border-bottom: (2 * $table-border-width) solid $table-border-color;
2121
}
2222

2323
tbody + tbody {
24-
border-top: 2px solid $table-border-color;
24+
border-top: (2 * $table-border-width) solid $table-border-color;
2525
}
2626

2727
.table {
@@ -47,17 +47,17 @@
4747
// Add borders all around the table and between all the columns.
4848

4949
.table-bordered {
50-
border: 1px solid $table-border-color;
50+
border: $table-border-width solid $table-border-color;
5151

5252
th,
5353
td {
54-
border: 1px solid $table-border-color;
54+
border: $table-border-width solid $table-border-color;
5555
}
5656

5757
thead {
5858
th,
5959
td {
60-
border-bottom-width: 2px;
60+
border-bottom-width: (2 * $table-border-width);
6161
}
6262
}
6363
}
@@ -114,7 +114,7 @@
114114

115115
// TODO: find out if we need this still.
116116
//
117-
// border: 1px solid $table-border-color;
117+
// border: $table-border-width solid $table-border-color;
118118
// -ms-overflow-style: -ms-autohiding-scrollbar; // See https://github.com/twbs/bootstrap/pull/10057
119119
}
120120

@@ -160,11 +160,11 @@
160160

161161
th,
162162
td {
163-
border-top: 1px solid $table-border-color;
164-
border-left: 1px solid $table-border-color;
163+
border-top: $table-border-width solid $table-border-color;
164+
border-left: $table-border-width solid $table-border-color;
165165

166166
&:last-child {
167-
border-right: 1px solid $table-border-color;
167+
border-right: $table-border-width solid $table-border-color;
168168
}
169169
}
170170

@@ -175,7 +175,7 @@
175175
tr:last-child {
176176
th,
177177
td {
178-
border-bottom: 1px solid $table-border-color;
178+
border-bottom: $table-border-width solid $table-border-color;
179179
}
180180
}
181181
}
@@ -187,7 +187,7 @@
187187
th,
188188
td {
189189
display: block !important;
190-
border: 1px solid $table-border-color;
190+
border: $table-border-width solid $table-border-color;
191191
}
192192
}
193193
}

scss/_variables.scss

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,7 @@ $table-bg-accent: #f9f9f9 !default;
207207
$table-bg-hover: #f5f5f5 !default;
208208
$table-bg-active: $table-bg-hover !default;
209209

210+
$table-border-width: $border-width !default;
210211
$table-border-color: $gray-lighter !default;
211212

212213

@@ -265,7 +266,8 @@ $input-bg: #fff !default;
265266
$input-bg-disabled: $gray-lighter !default;
266267

267268
$input-color: $gray !default;
268-
$input-border: #ccc !default;
269+
$input-border-color: #ccc !default;
270+
$input-border-width: $border-width !default;
269271
$input-box-shadow: inset 0 1px 1px rgba(0,0,0,.075) !default;
270272

271273
$input-border-radius: $border-radius !default;
@@ -290,7 +292,7 @@ $input-height-sm: (($font-size-sm * $line-height-sm) + ($input-pa
290292
$form-group-margin-bottom: $spacer-y !default;
291293

292294
$input-group-addon-bg: $gray-lighter !default;
293-
$input-group-addon-border-color: $input-border !default;
295+
$input-group-addon-border-color: $input-border-color !default;
294296

295297
$cursor-disabled: not-allowed !default;
296298

@@ -305,7 +307,8 @@ $form-icon-danger: "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My
305307
// Dropdown menu container and contents.
306308

307309
$dropdown-bg: #fff !default;
308-
$dropdown-border: rgba(0,0,0,.15) !default;
310+
$dropdown-border-color: rgba(0,0,0,.15) !default;
311+
$dropdown-border-width: $border-width !default;
309312
$dropdown-divider-bg: #e5e5e5 !default;
310313

311314
$dropdown-link-color: $gray-dark !default;
@@ -364,6 +367,7 @@ $nav-disabled-link-hover-color: $gray-light !default;
364367

365368
$nav-tabs-border-color: #ddd !default;
366369

370+
$nav-tabs-link-border-width: $border-width !default;
367371
$nav-tabs-link-hover-border-color: $gray-lighter !default;
368372

369373
$nav-tabs-active-link-hover-bg: $body-bg !default;
@@ -390,7 +394,8 @@ $pagination-padding-y-lg: .75rem !default;
390394

391395
$pagination-color: $link-color !default;
392396
$pagination-bg: #fff !default;
393-
$pagination-border: #ddd !default;
397+
$pagination-border-width: $border-width !default;
398+
$pagination-border-color: #ddd !default;
394399

395400
$pagination-hover-color: $link-hover-color !default;
396401
$pagination-hover-bg: $gray-lighter !default;
@@ -408,7 +413,8 @@ $pagination-disabled-border: #ddd !default;
408413
// Pager
409414

410415
$pager-bg: $pagination-bg !default;
411-
$pager-border: $pagination-border !default;
416+
$pager-border-width: $border-width !default;
417+
$pager-border-color: $pagination-border-color !default;
412418
$pager-border-radius: 15px !default;
413419

414420
$pager-hover-bg: $pagination-hover-bg !default;
@@ -474,6 +480,7 @@ $tooltip-arrow-color: $tooltip-bg !default;
474480

475481
$popover-bg: #fff !default;
476482
$popover-max-width: 276px !default;
483+
$popover-border-width: $border-width !default;
477484
$popover-border-color: rgba(0,0,0,.2) !default;
478485

479486
$popover-title-bg: darken($popover-bg, 3%) !default;
@@ -561,7 +568,8 @@ $progress-bar-info-bg: $brand-info !default;
561568
// List group
562569

563570
$list-group-bg: #fff !default;
564-
$list-group-border: #ddd !default;
571+
$list-group-border-color: #ddd !default;
572+
$list-group-border-width: $border-width !default;
565573
$list-group-border-radius: $border-radius !default;
566574

567575
$list-group-hover-bg: #f5f5f5 !default;
@@ -583,7 +591,8 @@ $list-group-link-heading-color: #333 !default;
583591

584592
$thumbnail-padding: .25rem !default;
585593
$thumbnail-bg: $body-bg !default;
586-
$thumbnail-border: #ddd !default;
594+
$thumbnail-border-width: $border-width !default;
595+
$thumbnail-border-color: #ddd !default;
587596
$thumbnail-border-radius: $border-radius !default;
588597

589598

0 commit comments

Comments
 (0)
0