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
72a2efb3
Commit
72a2efb3
authored
11 years ago
by
ggam
Browse files
Options
Download
Email Patches
Plain Diff
Added table-row-variant mixin
parent
3890ab39
1 merge request
!9540
Added table-row-variant mixin
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
less/mixins.less
+31
-0
less/mixins.less
less/tables.less
+7
-43
less/tables.less
with
38 additions
and
43 deletions
+38
-43
less/mixins.less
+
31
-
0
View file @
72a2efb3
...
@@ -360,6 +360,37 @@
...
@@ -360,6 +360,37 @@
}
}
}
}
// Tables
// -------------------------
.table-row-variant(@state; @background; @border) {
// Exact selectors below required to override `.table-striped` and prevent
// inheritance to nested tables.
.table > thead > tr,
.table > tbody > tr,
.table > tfoot > tr {
> td.@{state},
> th.@{state},
&.@{state} > td,
&.@{state} > th {
background-color: @background;
border-color: @border;
}
}
// Hover states for `.table-hover`
// Note: this is not available for cells or rows within `thead` or `tfoot`.
.table-hover > tbody > tr {
> td.@{state}:hover,
> th.@{state}:hover,
&.@{state}:hover > td {
background-color: darken(@background, 5%);
border-color: darken(@border, 5%);
//background-color: darken(@background, 5%);
//border-color: darken(@border, 5%);
}
}
}
// Button variants
// Button variants
// -------------------------
// -------------------------
// Easily pump out default styles, as well as :hover, :focus, :active,
// Easily pump out default styles, as well as :hover, :focus, :active,
...
...
This diff is collapsed.
Click to expand it.
less/tables.less
+
7
-
43
View file @
72a2efb3
...
@@ -164,48 +164,12 @@ table {
...
@@ -164,48 +164,12 @@ table {
&.active > th {
&.active > th {
background-color: @table-bg-active;
background-color: @table-bg-active;
}
}
> td.success,
> th.success,
&.success > td,
&.success > th {
background-color: @state-success-bg;
border-color: @state-success-border;
}
> td.danger,
> th.danger,
&.danger > td,
&.danger > th {
background-color: @state-danger-bg;
border-color: @state-danger-border;
}
> td.warning,
> th.warning,
&.warning > td,
&.warning > th {
background-color: @state-warning-bg;
border-color: @state-warning-border;
}
}
}
// Hover states for `.table-hover`
// Contextual variants
// Note: this is not available for cells or rows within `thead` or `tfoot`.
// -------------------
.table-hover > tbody > tr {
.table-row-variant(success; @state-success-bg; @state-success-border);
> td.success:hover,
> th.success:hover,
.table-row-variant(danger; @state-danger-bg; @state-danger-border);
&.success:hover > td {
background-color: darken(@state-success-bg, 5%);
.table-row-variant(warning; @state-warning-bg; @state-warning-border);
border-color: darken(@state-success-border, 5%);
}
> td.danger:hover,
> th.danger:hover,
&.danger:hover > td {
background-color: darken(@state-danger-bg, 5%);
border-color: darken(@state-danger-border, 5%);
}
> td.warning:hover,
> th.warning:hover,
&.warning:hover > td {
background-color: darken(@state-warning-bg, 5%);
border-color: darken(@state-warning-border, 5%);
}
}
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