Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
bootstrap
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
bootstrap
Commits
55bbb9ff
Commit
55bbb9ff
authored
Apr 22, 2013
by
Artur Kwiatkowski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Nuked local .a() mixins and simplified the nesting
parent
b7dcefea
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
73 deletions
+34
-73
docs/assets/css/bootstrap.css
docs/assets/css/bootstrap.css
+10
-8
less/labels.less
less/labels.less
+24
-65
No files found.
docs/assets/css/bootstrap.css
View file @
55bbb9ff
...
@@ -4795,7 +4795,9 @@ a.thumbnail:focus {
...
@@ -4795,7 +4795,9 @@ a.thumbnail:focus {
border-radius
:
.25em
;
border-radius
:
.25em
;
}
}
.label
[
href
]
:hover
,
a
.label
:hover
,
a
.label
:hover
,
.label
[
href
]
:focus
,
a
.label
:focus
{
a
.label
:focus
{
color
:
#fff
;
color
:
#fff
;
text-decoration
:
none
;
text-decoration
:
none
;
...
@@ -4810,14 +4812,6 @@ a.label:focus {
...
@@ -4810,14 +4812,6 @@ a.label:focus {
background-color
:
#c9302c
;
background-color
:
#c9302c
;
}
}
.label-warning
{
background-color
:
#f0ad4e
;
}
.label-warning
[
href
]
{
background-color
:
#ec971f
;
}
.label-success
{
.label-success
{
background-color
:
#5cb85c
;
background-color
:
#5cb85c
;
}
}
...
@@ -4826,6 +4820,14 @@ a.label:focus {
...
@@ -4826,6 +4820,14 @@ a.label:focus {
background-color
:
#449d44
;
background-color
:
#449d44
;
}
}
.label-warning
{
background-color
:
#f0ad4e
;
}
.label-warning
[
href
]
{
background-color
:
#ec971f
;
}
.label-info
{
.label-info
{
background-color
:
#5bc0de
;
background-color
:
#5bc0de
;
}
}
...
...
less/labels.less
View file @
55bbb9ff
...
@@ -2,9 +2,7 @@
...
@@ -2,9 +2,7 @@
// Labels
// Labels
// --------------------------------------------------
// --------------------------------------------------
// LESS base
.label {
.label() {
display: inline;
display: inline;
padding: .25em .6em;
padding: .25em .6em;
font-size: 75%;
font-size: 75%;
...
@@ -17,8 +15,8 @@
...
@@ -17,8 +15,8 @@
background-color: @gray-light;
background-color: @gray-light;
border-radius: .25em;
border-radius: .25em;
//
Hover state, but only for links - as a mixin which will be accessible as LESS shorthand: .label > .a;
//
Nuke the hover effects for a.label and for label[href] - for anchors
.a()
{
&[href], a&
{
&:hover,
&:hover,
&:focus {
&:focus {
color: #fff;
color: #fff;
...
@@ -26,73 +24,34 @@
...
@@ -26,73 +24,34 @@
cursor: pointer;
cursor: pointer;
}
}
}
}
}
// Colors
// Colors
// Only give background-color difference to links (and to simplify, we don't qualifty with `a` but [href] attribute)
// Varying the background-color - if the a has href, then deploy darker color
// If there is a need for [href] then use local mixin a() via ex: .label-danger > .a; to attach additional CSS for [href] attr
.label-danger {
.label-danger() {
background-color: @label-danger-bg;
background-color: @label-danger-bg;
.a() {
&[href] {
&[href] {
background-color: darken(@label-danger-bg, 10%);
background-color: darken(@label-danger-bg, 10%);
}
}
}
}
}
.label-warning() {
background-color: @label-warning-bg;
.a() {
&[href] {
background-color: darken(@label-warning-bg, 10%);
}
}
}
.label-success()
{
.label-success
{
background-color: @label-success-bg;
background-color: @label-success-bg;
.a() {
&[href] {
&[href] {
background-color: darken(@label-success-bg, 10%);
background-color: darken(@label-success-bg, 10%);
}
}
}
}
.label-info() {
background-color: @label-info-bg;
.a() {
&[href] {
background-color: darken(@label-info-bg, 10%);
}
}
}
}
// populate mixins for CSS
.label {
.label();
}
a.label {
.label > .a;
}
.label-danger {
.label > .label-danger;
.label > .label-danger > .a; // will produce .label-danger[href] class for folks who like to use class in HTML
}
}
.label-warning {
.label-warning {
.label > .label-warning;
background-color: @label-warning-bg;
.label > .label-warning > .a;
&[href] {
}
background-color: darken(@label-warning-bg, 10%);
}
.label-success {
.label > .label-success;
.label > .label-success > .a;
}
}
.label-info {
.label-info {
.label > .label-info;
background-color: @label-info-bg;
.label > .label-info > .a;
&[href] {
background-color: darken(@label-info-bg, 10%);
}
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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