Skip to content
GitLab
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
af9df8c3
Commit
af9df8c3
authored
7 years ago
by
Mark Otto
Browse files
Options
Download
Email Patches
Plain Diff
update new focus and shadow properties to use vars
parent
04b32db8
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
scss/_buttons.scss
+2
-2
scss/_buttons.scss
scss/_variables.scss
+4
-0
scss/_variables.scss
scss/mixins/_buttons.scss
+6
-6
scss/mixins/_buttons.scss
scss/mixins/_forms.scss
+5
-5
scss/mixins/_forms.scss
with
17 additions
and
13 deletions
+17
-13
scss/_buttons.scss
+
2
-
2
View file @
af9df8c3
...
...
@@ -22,7 +22,7 @@
&
:focus
,
&
.focus
{
outline
:
0
;
box-shadow
:
$
input-
btn-focus-box-shadow
;
box-shadow
:
$btn-focus-box-shadow
;
}
// Disabled comes first so active can properly restyle
...
...
@@ -35,7 +35,7 @@
&
:not
([
disabled
])
:not
(
.disabled
)
:active
,
&
:not
([
disabled
])
:not
(
.disabled
)
.active
{
background-image
:
none
;
@include
box-shadow
(
$
input-
btn-focus-box-shadow
,
$btn-active-box-shadow
);
@include
box-shadow
(
$btn-focus-box-shadow
,
$btn-active-box-shadow
);
}
}
...
...
This diff is collapsed.
Click to expand it.
scss/_variables.scss
+
4
-
0
View file @
af9df8c3
...
...
@@ -353,6 +353,8 @@ $btn-border-width: $input-btn-border-width !default;
$btn-font-weight
:
$font-weight-normal
!
default
;
$btn-box-shadow
:
inset
0
1px
0
rgba
(
$white
,
.15
)
,
0
1px
1px
rgba
(
$black
,
.075
)
!
default
;
$btn-focus-width
:
$input-btn-focus-width
!
default
;
$btn-focus-box-shadow
:
$input-btn-focus-box-shadow
!
default
;
$btn-active-box-shadow
:
inset
0
3px
5px
rgba
(
$black
,
.125
)
!
default
;
$btn-link-disabled-color
:
$gray-600
!
default
;
...
...
@@ -396,6 +398,8 @@ $input-border-radius-sm: $border-radius-sm !default;
$input-focus-bg
:
$input-bg
!
default
;
$input-focus-border-color
:
lighten
(
theme-color
(
"primary"
)
,
25%
)
!
default
;
$input-focus-color
:
$input-color
!
default
;
$input-focus-width
:
$input-btn-focus-width
!
default
;
$input-focus-box-shadow
:
$input-btn-focus-box-shadow
!
default
;
$input-placeholder-color
:
$gray-600
!
default
;
...
...
This diff is collapsed.
Click to expand it.
scss/mixins/_buttons.scss
+
6
-
6
View file @
af9df8c3
...
...
@@ -19,9 +19,9 @@
&
.focus
{
// Avoid using mixin so we can pass custom focus shadow properly
@if
$enable-shadows
{
box-shadow
:
$btn-box-shadow
,
0
0
0
$
input-
btn-focus-width
rgba
(
$border
,
.5
);
box-shadow
:
$btn-box-shadow
,
0
0
0
$btn-focus-width
rgba
(
$border
,
.5
);
}
@else
{
box-shadow
:
0
0
0
$
input-
btn-focus-width
rgba
(
$border
,
.5
);
box-shadow
:
0
0
0
$btn-focus-width
rgba
(
$border
,
.5
);
}
}
...
...
@@ -44,9 +44,9 @@
// Avoid using mixin so we can pass custom focus shadow properly
@if
$enable-shadows
{
box-shadow
:
$btn-active-box-shadow
,
0
0
0
$
input-
btn-focus-width
rgba
(
$border
,
.5
);
box-shadow
:
$btn-active-box-shadow
,
0
0
0
$btn-focus-width
rgba
(
$border
,
.5
);
}
@else
{
box-shadow
:
0
0
0
$
input-
btn-focus-width
rgba
(
$border
,
.5
);
box-shadow
:
0
0
0
$btn-focus-width
rgba
(
$border
,
.5
);
}
}
}
...
...
@@ -65,7 +65,7 @@
&
:focus
,
&
.focus
{
box-shadow
:
0
0
0
$
input-
btn-focus-width
rgba
(
$color
,
.5
);
box-shadow
:
0
0
0
$btn-focus-width
rgba
(
$color
,
.5
);
}
&
.disabled
,
...
...
@@ -81,7 +81,7 @@
background-color
:
$color
;
border-color
:
$color
;
// Avoid using mixin so we can pass custom focus shadow properly
box-shadow
:
0
0
0
$
input-
btn-focus-width
rgba
(
$color
,
.5
);
box-shadow
:
0
0
0
$btn-focus-width
rgba
(
$color
,
.5
);
}
}
...
...
This diff is collapsed.
Click to expand it.
scss/mixins/_forms.scss
+
5
-
5
View file @
af9df8c3
...
...
@@ -18,9 +18,9 @@
outline
:
none
;
// Avoid using mixin so we can pass custom focus shadow properly
@if
$enable-shadows
{
box-shadow
:
$input-box-shadow
,
$input-
btn-
focus-box-shadow
;
box-shadow
:
$input-box-shadow
,
$input-focus-box-shadow
;
}
@else
{
box-shadow
:
$input-
btn-
focus-box-shadow
;
box-shadow
:
$input-focus-box-shadow
;
}
}
}
...
...
@@ -57,7 +57,7 @@
border-color
:
$color
;
&
:focus
{
box-shadow
:
0
0
0
$input-
btn-
focus-width
rgba
(
$color
,
.25
);
box-shadow
:
0
0
0
$input-focus-width
rgba
(
$color
,
.25
);
}
~
.
#{
$state
}
-feedback
,
...
...
@@ -90,7 +90,7 @@
}
&
:focus
{
~
.custom-control-indicator
{
box-shadow
:
0
0
0
1px
$body-bg
,
0
0
0
$input-
btn-
focus-width
rgba
(
$color
,
.25
);
box-shadow
:
0
0
0
1px
$body-bg
,
0
0
0
$input-focus-width
rgba
(
$color
,
.25
);
}
}
}
...
...
@@ -107,7 +107,7 @@
}
&
:focus
{
~
.custom-file-control
{
box-shadow
:
0
0
0
$input-
btn-
focus-width
rgba
(
$color
,
.25
);
box-shadow
:
0
0
0
$input-focus-width
rgba
(
$color
,
.25
);
}
}
}
...
...
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