Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Material guideline #196

Open
wants to merge 15 commits into
base: v4-dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add files via upload
  • Loading branch information
djibe authored Jun 20, 2019
commit bc91385732a62f2f63d1a4d8b998333670579035
1 change: 1 addition & 0 deletions assets/scss/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
@import 'mixins/border-radius';
@import 'mixins/breakpoint';
@import 'mixins/clearfix';
@import 'mixins/deprecate';
@import 'mixins/float';
@import 'mixins/form';
@import 'mixins/grid';
Expand Down
6 changes: 4 additions & 2 deletions assets/scss/_utilities.scss
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
// Bootstrap

@import 'utilities/align';
@import 'utilities/borders';
@import 'utilities/background';
@import 'utilities/borders';
@import 'utilities/clearfix';
@import 'utilities/display';
@import "utilities/embed";
@import 'utilities/flex';
@import 'utilities/float';
@import 'utilities/overflow';
@import 'utilities/position';
@import 'utilities/screenreader';
@import 'utilities/screenreaders';
@import 'utilities/shadows';
@import 'utilities/sizing';
@import 'utilities/spacing';
@import 'utilities/stretched-link';
@import "utilities/spacing";
@import 'utilities/text';
@import 'utilities/visibility';

Expand Down
18 changes: 10 additions & 8 deletions assets/scss/base/_base.scss
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
:root {
@each $bp, $value in $grid-breakpoints {
--breakpoint-#{$bp}: #{$value};
}

// Custom variable values only support SassScript inside `#{}`.
@each $color, $value in $colors {
--#{$color}: #{$value};
}
Expand All @@ -16,10 +13,15 @@
}
}
}

@each $bp, $value in $grid-breakpoints {
--breakpoint-#{$bp}: #{$value};
}

--font-family-monospace: #{inspect($font-family-monospace)};
// Use `inspect` for lists so that quoted items keep the quotes.
// See https://github.com/sass/sass/issues/2383#issuecomment-336349172
--font-family-sans-serif: #{inspect($font-family-sans-serif)};
--font-family-serif: #{inspect($font-family-serif)};
--font-family-monospace: #{inspect($font-family-monospace)};
}

// stylelint-disable declaration-no-important, selector-no-qualifying-type, property-no-vendor-prefix
Expand Down Expand Up @@ -266,7 +268,7 @@ a {
text-decoration: $link-decoration;
-webkit-text-decoration-skip: objects;

@include active-focus-hover {
@include hover-focus-active {
color: $link-color-hover;
text-decoration: $link-decoration-hover;
}
Expand All @@ -276,7 +278,7 @@ a:not([href]):not([tabindex]) {
color: inherit;
text-decoration: none;

@include active-focus-hover {
@include hover-focus-active {
color: inherit;
text-decoration: none;
}
Expand Down
46 changes: 27 additions & 19 deletions assets/scss/bootstrap/_alert.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// 4.3.1
//
// Base styles
//

.alert {
@include border-radius($alert-border-radius);
Expand All @@ -10,18 +12,29 @@
position: relative;
}

@each $color, $values in $theme-colors {
.alert-#{$color} {
background-color: theme-color-light($color);
color: color-yiq(theme-color-light($color));
// Headings for larger alerts
.alert-link {
color: inherit;
font-weight: $alert-link-font-weight;

@include hover-focus-active {
color: inherit;
}
}

// Dismissible
// Provide class for links that match alerts
.alert-link {
font-weight: $alert-link-font-weight;
}

// Dismissible alerts
//
// Expand the right padding and account for the close button's positioning.

.alert-dismissible {
padding-right: ($alert-padding-x * 2 + $close-font-size);
padding-right: $close-font-size + $alert-padding-x * 2;

// Adjust close link position
.close {
color: inherit;
padding: ($alert-padding-y - ($close-font-size - $font-size-base * $line-height-base) / 2) $alert-padding-x;
Expand All @@ -31,17 +44,12 @@
}
}

// Misc

.alert-heading {
color: inherit;
}

.alert-link {
color: inherit;
font-weight: $alert-link-font-weight;

@include active-focus-hover {
color: inherit;
// Alternate styles
//
// Generate contextual modifier classes for colorizing the alert.
@each $color, $values in $theme-colors {
.alert-#{$color} {
background-color: theme-color-light($color);
color: color-yiq(theme-color-light($color));
}
}
41 changes: 28 additions & 13 deletions assets/scss/bootstrap/_badge.scss
Original file line number Diff line number Diff line change
@@ -1,48 +1,63 @@
// 4.3.1 ok
// Base class
//
// Requires one of the contextual, color modifier classes for `color` and
// `background-color`.

.badge {
@include border-radius($badge-border-radius);
//@include transition($badge-transition);

align-items: center;
display: inline-flex;
font-size: inherit;
display: flex;
font-size: inherit; //@include font-size($badge-font-size);
font-weight: $badge-font-weight;
line-height: inherit;
padding-right: $badge-padding-x;
padding-left: $badge-padding-x;
text-align: center;
vertical-align: baseline;
white-space: nowrap;

@at-root a#{&} {
@include hover-focus {
text-decoration: none;
}
}

// Empty badges collapse automatically
&:empty {
display: none;
}

.btn & {
margin-top: -1px;
/*margin-top: -1px;
margin-bottom: -1px;
padding-top: 1px;
padding-bottom: 1px;
padding-bottom: 1px;*/
position: relative;
top: -1px;
}
}

// Pill badges with extra rounded corners

.badge-pill {
@include border-radius(1em);

//padding-right: $badge-pill-padding-x;
//padding-left: $badge-pill-padding-x;
}

@each $color, $values in $theme-colors {
.badge-#{$color} {
background-color: theme-color($color);
color: color-yiq(theme-color($color));

&[href] {
@include active-focus-hover {
@include hover-focus-active {
background-color: theme-color-dark($color);
color: color-yiq(theme-color-dark($color));
text-decoration: none;
}
}
}
}

// Pill badges with extra rounded corners

.badge-pill {
@include border-radius(1em);
}
17 changes: 14 additions & 3 deletions assets/scss/bootstrap/_breadcrumb.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// 4.3.1 ok

.breadcrumb {
@include border-radius($breadcrumb-border-radius);

Expand All @@ -20,7 +18,7 @@
color: $breadcrumb-item-color;
display: flex;

@include active-focus-hover {
@include hover-focus-active {
color: $breadcrumb-item-color-hover;
}

Expand All @@ -46,4 +44,17 @@
margin-right: $breadcrumb-inner-spacer-x;
}
}

+ .breadcrumb-item:hover::before {
text-decoration: underline;
}

// stylelint-disable-next-line no-duplicate-selectors
+ .breadcrumb-item:hover::before {
text-decoration: none;
}

&.active {
color: $breadcrumb-item-color-hover;
}
}
2 changes: 1 addition & 1 deletion assets/scss/bootstrap/_carousel.scss
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
user-select: none;
width: $carousel-control-size;

@include active-focus-hover {
@include hover-focus-active {
background-color: $carousel-control-bg-hover;
color: $carousel-control-color;
text-decoration: none;
Expand Down
14 changes: 13 additions & 1 deletion assets/scss/bootstrap/_close.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@
font-size: $close-font-size;
font-weight: $close-font-weight;
line-height: 1;
// opacity: .5;
padding: 0;

@include active-focus-hover {
@include hover-focus-active {
color: $close-color-hover;
text-decoration: none;
}
Expand All @@ -25,3 +26,14 @@
cursor: pointer;
}
}

button.close {
padding: 0;
background-color: transparent;
border: 0;
appearance: none;
}

a.close.disabled {
pointer-events: none;
}
2 changes: 1 addition & 1 deletion assets/scss/bootstrap/_code.scss
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ kbd {

kbd {
font-size: 100%;
font-weight: bolder;
font-weight: $font-weight-bolder;
padding: 0;
}
}
Expand Down
Loading