aboutsummaryrefslogtreecommitdiffstats
path: root/scss/uikit/components/label.scss
diff options
context:
space:
mode:
authorGravatar Gareth Coles <[email protected]>2018-06-05 16:07:35 +0100
committerGravatar GitHub <[email protected]>2018-06-05 16:07:35 +0100
commit13a3c1e29473aa9f563e8db4ad94cb3eee9bdfe6 (patch)
tree290c6d668ec9161a39065456a33ec634215907cc /scss/uikit/components/label.scss
parentdocumentation metadata API (#57) (diff)
Move from CSS to SCSS (#86)
* Rewrite existing style.css with sass * Add "uses-rst" class for pages that use rendered RST This replaces the previous method of just listing every page in the sass * Remove old debug print * Mixins and error pages * Newly built CSS * Add SASS cache to .gitignore * New error SASS * Slight changes to error template * Add UIKit SCSS to repo This includes the LICENSE and our customizations, which makes life way easier for contributors * Reorganize sass folder; your watchers can avoid uikit now * Sass folder should be called scss * Change variable names * [SCSS] Linting * Fix scss_lint gem name [ci skip] * [SCSS] Now you can compile with just Python! * Temporary hack to make the wiki editor taller * [SCSS] @jchristgit * [SCSS.py] Require specification of include dir to simplify the SCSS imports * [SCSS] All inline styles have been removed * [SCSS] Update UIKit theme to import from our variables * [SCSS] Remove extra newlines in errors/_common.scss
Diffstat (limited to 'scss/uikit/components/label.scss')
-rw-r--r--scss/uikit/components/label.scss102
1 files changed, 102 insertions, 0 deletions
diff --git a/scss/uikit/components/label.scss b/scss/uikit/components/label.scss
new file mode 100644
index 00000000..6600aedf
--- /dev/null
+++ b/scss/uikit/components/label.scss
@@ -0,0 +1,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(){} \ No newline at end of file