Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Bootstrap
bootstrap
Commits
8a98bfd8
Commit
8a98bfd8
authored
7 years ago
by
Mark Otto
Browse files
Options
Download
Plain Diff
Merge branch 'yiq-function-update' of
https://github.com/gijsbotje/bootstrap
into v4-dev
parents
fac70149
98778164
6 merge requests
!28721
Hot test
,
!27561
Adds font-weight-medium to font weight classes
,
!25494
web pack
,
!25326
Adjust examples
,
!23207
#22402 : modal: new autofocus & keyboardBtnNav options
,
!17021
v4
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
assets/scss/_colors.scss
+3
-3
assets/scss/_colors.scss
scss/_functions.scss
+3
-3
scss/_functions.scss
scss/mixins/_badge.scss
+2
-2
scss/mixins/_badge.scss
scss/mixins/_buttons.scss
+2
-2
scss/mixins/_buttons.scss
with
10 additions
and
10 deletions
+10
-10
assets/scss/_colors.scss
+
3
-
3
View file @
8a98bfd8
...
...
@@ -4,21 +4,21 @@
@each
$color
,
$value
in
$colors
{
.swatch-
#{
$color
}
{
color
:
color-yiq
(
$value
);
background-color
:
#{
$value
}
;
@include
color-yiq
(
$value
);
}
}
@each
$color
,
$value
in
$theme-colors
{
.swatch-
#{
$color
}
{
color
:
color-yiq
(
$value
);
background-color
:
#{
$value
}
;
@include
color-yiq
(
$value
);
}
}
@each
$color
,
$value
in
$grays
{
.swatch-
#{
$color
}
{
color
:
color-yiq
(
$value
);
background-color
:
#{
$value
}
;
@include
color-yiq
(
$value
);
}
}
This diff is collapsed.
Click to expand it.
scss/_functions.scss
+
3
-
3
View file @
8a98bfd8
...
...
@@ -49,7 +49,7 @@
}
// Color contrast
@
mixi
n
color-yiq
(
$color
)
{
@
functio
n
color-yiq
(
$color
)
{
$r
:
red
(
$color
);
$g
:
green
(
$color
);
$b
:
blue
(
$color
);
...
...
@@ -57,9 +57,9 @@
$yiq
:
((
$r
*
299
)
+
(
$g
*
587
)
+
(
$b
*
114
))
/
1000
;
@if
(
$yiq
>=
150
)
{
color
:
#111
;
@return
#111
;
}
@else
{
color
:
#fff
;
@return
#fff
;
}
}
...
...
This diff is collapsed.
Click to expand it.
scss/mixins/_badge.scss
+
2
-
2
View file @
8a98bfd8
@mixin
badge-variant
(
$bg
)
{
@include
color-yiq
(
$bg
);
color
:
color-yiq
(
$bg
);
background-color
:
$bg
;
&
[
href
]
{
@include
hover-focus
{
@include
color-yiq
(
$bg
);
color
:
color-yiq
(
$bg
);
text-decoration
:
none
;
background-color
:
darken
(
$bg
,
10%
);
}
...
...
This diff is collapsed.
Click to expand it.
scss/mixins/_buttons.scss
+
2
-
2
View file @
8a98bfd8
...
...
@@ -4,13 +4,13 @@
// and disabled options for all buttons
@mixin
button-variant
(
$background
,
$border
,
$active-background
:
darken
(
$background
,
7
.5%
)
,
$active-border
:
darken
(
$border
,
10%
))
{
@include
color-yiq
(
$background
);
color
:
color-yiq
(
$background
);
background-color
:
$background
;
border-color
:
$border
;
@include
box-shadow
(
$btn-box-shadow
);
@include
hover
{
@include
color-yiq
(
$active-background
);
color
:
color-yiq
(
$active-background
);
background-color
:
$active-background
;
border-color
:
$active-border
;
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Snippets