Skip to content

Commit

Permalink
chore(styles): format styles with Prettier 😍 (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
DHedgecock authored May 31, 2018
1 parent c709b09 commit e3ada9a
Show file tree
Hide file tree
Showing 53 changed files with 795 additions and 444 deletions.
2 changes: 1 addition & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1 +1 @@
package.json
styles/bootstrap/_variables.scss
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"styles": "npm run styles:copy",
"test:unit": "BABEL_ENV=test NODE_ENV=test jest --env=jsdom",
"test:watch": "BABEL_ENV=test NODE_ENV=test jest --env=jsdom --watch",
"format": "prettier --write \"{demo,src}/**/*.{js,scss}\" guides/*.md",
"format": "prettier --write \"{demo,src,styles}/**/*.{js,scss}\" guides/*.md",
"lint": "NODE_ENV=test eslint src demo",
"documentation": "NODE_ENV=production webpack --env=production",
"clean": "rm -rf dist es esnext build",
Expand Down
28 changes: 14 additions & 14 deletions styles/bootstrap/_button-group.scss
Original file line number Diff line number Diff line change
Expand Up @@ -64,17 +64,20 @@
//
// Remix the default button sizing classes into new ones for easier manipulation.

.btn-group-sm > .btn { @extend .btn-sm; }
.btn-group-lg > .btn { @extend .btn-lg; }

.btn-group-sm > .btn {
@extend .btn-sm;
}
.btn-group-lg > .btn {
@extend .btn-lg;
}

//
// Split button dropdowns
//

.dropdown-toggle-split {
padding-right: $btn-padding-x * .75;
padding-left: $btn-padding-x * .75;
padding-right: $btn-padding-x * 0.75;
padding-left: $btn-padding-x * 0.75;

&::after,
.dropup &::after,
Expand All @@ -88,16 +91,15 @@
}

.btn-sm + .dropdown-toggle-split {
padding-right: $btn-padding-x-sm * .75;
padding-left: $btn-padding-x-sm * .75;
padding-right: $btn-padding-x-sm * 0.75;
padding-left: $btn-padding-x-sm * 0.75;
}

.btn-lg + .dropdown-toggle-split {
padding-right: $btn-padding-x-lg * .75;
padding-left: $btn-padding-x-lg * .75;
padding-right: $btn-padding-x-lg * 0.75;
padding-left: $btn-padding-x-lg * 0.75;
}


// The clickable button for toggling the menu
// Set the same inset shadow as the :active state
.btn-group.show .dropdown-toggle {
Expand All @@ -109,7 +111,6 @@
}
}


//
// Vertical button groups
//
Expand Down Expand Up @@ -144,7 +145,6 @@
}
}


// Checkbox and radio options
//
// In order to support the browser's form validation feedback, powered by the
Expand All @@ -162,8 +162,8 @@
> .btn-group > .btn {
margin-bottom: 0; // Override default `<label>` value

input[type="radio"],
input[type="checkbox"] {
input[type='radio'],
input[type='checkbox'] {
position: absolute;
clip: rect(0, 0, 0, 0);
pointer-events: none;
Expand Down
34 changes: 24 additions & 10 deletions styles/bootstrap/_buttons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,13 @@
vertical-align: middle;
user-select: none;
border: $btn-border-width solid transparent;
@include button-size($btn-padding-y, $btn-padding-x, $font-size-base, $btn-line-height, $btn-border-radius);
@include button-size(
$btn-padding-y,
$btn-padding-x,
$font-size-base,
$btn-line-height,
$btn-border-radius
);
@include transition($btn-transition);

// Share hover and focus styles
Expand Down Expand Up @@ -55,7 +61,6 @@ fieldset:disabled a.btn {
pointer-events: none;
}


//
// Alternate buttons
//
Expand All @@ -72,7 +77,6 @@ fieldset:disabled a.btn {
}
}


//
// Link buttons
//
Expand Down Expand Up @@ -106,20 +110,30 @@ fieldset:disabled a.btn {
// No need for an active state here
}


//
// Button Sizes
//

.btn-lg {
@include button-size($btn-padding-y-lg, $btn-padding-x-lg, $font-size-lg, $btn-line-height-lg, $btn-border-radius-lg);
@include button-size(
$btn-padding-y-lg,
$btn-padding-x-lg,
$font-size-lg,
$btn-line-height-lg,
$btn-border-radius-lg
);
}

.btn-sm {
@include button-size($btn-padding-y-sm, $btn-padding-x-sm, $font-size-sm, $btn-line-height-sm, $btn-border-radius-sm);
@include button-size(
$btn-padding-y-sm,
$btn-padding-x-sm,
$font-size-sm,
$btn-line-height-sm,
$btn-border-radius-sm
);
}


//
// Block button
//
Expand All @@ -135,9 +149,9 @@ fieldset:disabled a.btn {
}

// Specificity overrides
input[type="submit"],
input[type="reset"],
input[type="button"] {
input[type='submit'],
input[type='reset'],
input[type='button'] {
&.btn-block {
width: 100%;
}
Expand Down
5 changes: 0 additions & 5 deletions styles/bootstrap/_card.scss
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@
}
}


//
// Header navs
//
Expand Down Expand Up @@ -135,7 +134,6 @@
@include border-bottom-radius($card-inner-border-radius);
}


// Card deck

.card-deck {
Expand Down Expand Up @@ -163,7 +161,6 @@
}
}


//
// Card groups
//
Expand Down Expand Up @@ -248,7 +245,6 @@
}
}


//
// Columns
//
Expand All @@ -271,7 +267,6 @@
}
}


//
// Accordion
//
Expand Down
18 changes: 7 additions & 11 deletions styles/bootstrap/_carousel.scss
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,14 @@
}
}


//
// Alternate transitions
//

.carousel-fade {
.carousel-item {
opacity: 0;
transition-duration: .6s;
transition-duration: 0.6s;
transition-property: opacity;
}

Expand Down Expand Up @@ -103,7 +102,6 @@
}
}


//
// Left/right controls for nav
//
Expand All @@ -129,19 +127,19 @@
color: $carousel-control-color;
text-decoration: none;
outline: 0;
opacity: .9;
opacity: 0.9;
}
}
.carousel-control-prev {
left: 0;
@if $enable-gradients {
background: linear-gradient(90deg, rgba($black, .25), rgba($black, .001));
background: linear-gradient(90deg, rgba($black, 0.25), rgba($black, 0.001));
}
}
.carousel-control-next {
right: 0;
@if $enable-gradients {
background: linear-gradient(270deg, rgba($black, .25), rgba($black, .001));
background: linear-gradient(270deg, rgba($black, 0.25), rgba($black, 0.001));
}
}

Expand All @@ -161,7 +159,6 @@
background-image: $carousel-control-next-icon-bg;
}


// Optional indicator pips
//
// Add an ordered list with the following class and add a list item for each
Expand Down Expand Up @@ -190,7 +187,7 @@
margin-left: $carousel-indicator-spacer;
text-indent: -999px;
cursor: pointer;
background-color: rgba($carousel-indicator-active-bg, .5);
background-color: rgba($carousel-indicator-active-bg, 0.5);

// Use pseudo classes to increase the hit area by 10px on top and bottom.
&::before {
Expand All @@ -200,7 +197,7 @@
display: inline-block;
width: 100%;
height: 10px;
content: "";
content: '';
}
&::after {
position: absolute;
Expand All @@ -209,7 +206,7 @@
display: inline-block;
width: 100%;
height: 10px;
content: "";
content: '';
}
}

Expand All @@ -218,7 +215,6 @@
}
}


// Optional captions
//
//
Expand Down
4 changes: 2 additions & 2 deletions styles/bootstrap/_close.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
line-height: 1;
color: $close-color;
text-shadow: $close-text-shadow;
opacity: .5;
opacity: 0.5;

@include hover-focus {
color: $close-color;
text-decoration: none;
opacity: .75;
opacity: 0.75;
}

// Opinionated: add "hand" cursor to non-disabled .close elements
Expand Down
Loading

0 comments on commit e3ada9a

Please sign in to comment.