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
e6042e6f
Commit
e6042e6f
authored
7 years ago
by
Patrick Yeo
Browse files
Options
Download
Email Patches
Plain Diff
Add option to disable carets on dropdowns through `$enable-caret`
parent
7de266d4
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
scss/_dropdown.scss
+2
-19
scss/_dropdown.scss
scss/_mixins.scss
+1
-0
scss/_mixins.scss
scss/_variables.scss
+1
-0
scss/_variables.scss
scss/mixins/_caret.scss
+35
-0
scss/mixins/_caret.scss
with
39 additions
and
19 deletions
+39
-19
scss/_dropdown.scss
+
2
-
19
View file @
e6042e6f
...
@@ -6,21 +6,7 @@
...
@@ -6,21 +6,7 @@
.dropdown-toggle
{
.dropdown-toggle
{
// Generate the caret automatically
// Generate the caret automatically
&
::after
{
@include
caret
;
display
:
inline-block
;
width
:
0
;
height
:
0
;
margin-left
:
$caret-width
*
.85
;
vertical-align
:
$caret-width
*
.85
;
content
:
""
;
border-top
:
$caret-width
solid
;
border-right
:
$caret-width
solid
transparent
;
border-left
:
$caret-width
solid
transparent
;
}
&
:empty::after
{
margin-left
:
0
;
}
}
}
// Allow for dropdowns to go bottom up (aka, dropup-menu)
// Allow for dropdowns to go bottom up (aka, dropup-menu)
...
@@ -32,10 +18,7 @@
...
@@ -32,10 +18,7 @@
}
}
.dropdown-toggle
{
.dropdown-toggle
{
&
::after
{
@include
caret
(
up
);
border-top
:
0
;
border-bottom
:
$caret-width
solid
;
}
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
scss/_mixins.scss
+
1
-
0
View file @
e6042e6f
...
@@ -19,6 +19,7 @@
...
@@ -19,6 +19,7 @@
// // Components
// // Components
@import
"mixins/alert"
;
@import
"mixins/alert"
;
@import
"mixins/buttons"
;
@import
"mixins/buttons"
;
@import
"mixins/caret"
;
@import
"mixins/pagination"
;
@import
"mixins/pagination"
;
@import
"mixins/lists"
;
@import
"mixins/lists"
;
@import
"mixins/list-group"
;
@import
"mixins/list-group"
;
...
...
This diff is collapsed.
Click to expand it.
scss/_variables.scss
+
1
-
0
View file @
e6042e6f
...
@@ -122,6 +122,7 @@ $theme-color-interval: 8% !default;
...
@@ -122,6 +122,7 @@ $theme-color-interval: 8% !default;
//
//
// Quickly modify global styling by enabling or disabling optional features.
// Quickly modify global styling by enabling or disabling optional features.
$enable-caret
:
true
!
default
;
$enable-rounded
:
true
!
default
;
$enable-rounded
:
true
!
default
;
$enable-shadows
:
false
!
default
;
$enable-shadows
:
false
!
default
;
$enable-gradients
:
false
!
default
;
$enable-gradients
:
false
!
default
;
...
...
This diff is collapsed.
Click to expand it.
scss/mixins/_caret.scss
0 → 100644
+
35
-
0
View file @
e6042e6f
@mixin
caret-down
{
border-top
:
$caret-width
solid
;
border-right
:
$caret-width
solid
transparent
;
border-bottom
:
0
;
border-left
:
$caret-width
solid
transparent
;
}
@mixin
caret-up
{
border-top
:
0
;
border-right
:
$caret-width
solid
transparent
;
border-bottom
:
$caret-width
solid
;
border-left
:
$caret-width
solid
transparent
;
}
@mixin
caret
(
$direction
:
down
)
{
@if
$enable-caret
{
&
::after
{
display
:
inline-block
;
width
:
0
;
height
:
0
;
margin-left
:
$caret-width
*
.85
;
vertical-align
:
$caret-width
*
.85
;
content
:
""
;
@if
$direction
==
down
{
@include
caret-down
;
}
@else
if
$direction
==
up
{
@include
caret-up
;
}
}
&
:empty::after
{
margin-left
:
0
;
}
}
}
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