aboutsummaryrefslogtreecommitdiffstats
path: root/scss/uikit/components/label.scss
blob: 6600aedfab6474d48cef09f9b344c0617df13926 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
// Name:            Label
// Description:     Component to indicate important notes
//
// Component:       `uk-label`
//
// Modifiers:       `uk-label-success`
//                  `uk-label-warning`
//                  `uk-label-danger`
//
// ========================================================================


// Variables
// ========================================================================

$label-padding-vertical:                         0 !default;
$label-padding-horizontal:                       $global-small-margin !default;
$label-background:                               $global-primary-background !default;
$label-line-height:                              $global-line-height !default;
$label-font-size:                                $global-small-font-size !default;
$label-color:                                    $global-inverse-color !default;

$label-success-background:                       $global-success-background !default;
$label-success-color:                            $global-inverse-color !default;
$label-warning-background:                       $global-warning-background !default;
$label-warning-color:                            $global-inverse-color !default;
$label-danger-background:                        $global-danger-background !default;
$label-danger-color:                             $global-inverse-color !default;


/* ========================================================================
   Component: Label
 ========================================================================== */

.uk-label {
    display: inline-block;
    padding: $label-padding-vertical $label-padding-horizontal;
    background: $label-background;
    line-height: $label-line-height;
    font-size: $label-font-size;
    color: $label-color;
    vertical-align: middle;
    white-space: nowrap;
    @if(mixin-exists(hook-label)) {@include hook-label();}
}


/* Color modifiers
 ========================================================================== */

/*
 * Success
 */

.uk-label-success {
    background-color: $label-success-background;
    color: $label-success-color;
    @if(mixin-exists(hook-label-success)) {@include hook-label-success();}
}

/*
 * Warning
 */

.uk-label-warning {
    background-color: $label-warning-background;
    color: $label-warning-color;
    @if(mixin-exists(hook-label-warning)) {@include hook-label-warning();}
}

/*
 * Danger
 */

.uk-label-danger {
    background-color: $label-danger-background;
    color: $label-danger-color;
    @if(mixin-exists(hook-label-danger)) {@include hook-label-danger();}
}


// Hooks
// ========================================================================

@if(mixin-exists(hook-label-misc)) {@include hook-label-misc();}

// @mixin hook-label(){}
// @mixin hook-label-success(){}
// @mixin hook-label-warning(){}
// @mixin hook-label-danger(){}
// @mixin hook-label-misc(){}


// Inverse
// ========================================================================

$inverse-label-background:                      $inverse-global-primary-background !default;
$inverse-label-color:                           $inverse-global-inverse-color !default;



// @mixin hook-inverse-label(){}