From 13a3c1e29473aa9f563e8db4ad94cb3eee9bdfe6 Mon Sep 17 00:00:00 2001 From: Gareth Coles Date: Tue, 5 Jun 2018 16:07:35 +0100 Subject: 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 --- scss/uikit/components/link.scss | 123 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 123 insertions(+) create mode 100644 scss/uikit/components/link.scss (limited to 'scss/uikit/components/link.scss') diff --git a/scss/uikit/components/link.scss b/scss/uikit/components/link.scss new file mode 100644 index 00000000..9e0ef0e7 --- /dev/null +++ b/scss/uikit/components/link.scss @@ -0,0 +1,123 @@ +// Name: Link +// Description: Styles for links +// +// Component: `uk-link-muted` +// `uk-link-text` +// `uk-link-heading` +// `uk-link-reset` +// +// ======================================================================== + + +// Variables +// ======================================================================== + +$link-muted-color: $global-muted-color !default; +$link-muted-hover-color: $global-color !default; + +$link-text-hover-color: $global-muted-color !default; + +$link-heading-hover-color: $global-primary-background !default; +$link-heading-hover-text-decoration: none !default; + + +/* ======================================================================== + Component: Link + ========================================================================== */ + + +/* Muted + ========================================================================== */ + +a.uk-link-muted, +.uk-link-muted a { + color: $link-muted-color; + @if(mixin-exists(hook-link-muted)) {@include hook-link-muted();} +} + +a.uk-link-muted:hover, +.uk-link-muted a:hover { + color: $link-muted-hover-color; + @if(mixin-exists(hook-link-muted-hover)) {@include hook-link-muted-hover();} +} + + +/* Text + ========================================================================== */ + +a.uk-link-text:not(:hover), +.uk-link-text a:not(:hover) { + color: inherit; + @if(mixin-exists(hook-link-text)) {@include hook-link-text();} +} + +a.uk-link-text:hover, +.uk-link-text a:hover { + color: $link-text-hover-color; + @if(mixin-exists(hook-link-text-hover)) {@include hook-link-text-hover();} +} + + +/* Heading + ========================================================================== */ + +a.uk-link-heading:not(:hover), +.uk-link-heading a:not(:hover) { + color: inherit; + @if(mixin-exists(hook-link-heading)) {@include hook-link-heading();} +} + +a.uk-link-heading:hover, +.uk-link-heading a:hover { + color: $link-heading-hover-color; + text-decoration: $link-heading-hover-text-decoration; + @if(mixin-exists(hook-link-heading-hover)) {@include hook-link-heading-hover();} +} + + +/* Reset + ========================================================================== */ + +/* + * `!important` needed to override inverse component + */ + +a.uk-link-reset, +a.uk-link-reset:hover, +.uk-link-reset a, +.uk-link-reset a:hover { + color: inherit !important; + text-decoration: none !important; + @if(mixin-exists(hook-link-reset)) {@include hook-link-reset();} +} + + +// Hooks +// ======================================================================== + +@if(mixin-exists(hook-link-misc)) {@include hook-link-misc();} + +// @mixin hook-link-muted(){} +// @mixin hook-link-muted-hover(){} +// @mixin hook-link-text(){} +// @mixin hook-link-text-hover(){} +// @mixin hook-link-heading(){} +// @mixin hook-link-heading-hover(){} +// @mixin hook-link-reset(){} +// @mixin hook-link-misc(){} + + +// Inverse +// ======================================================================== + +$inverse-link-muted-color: $inverse-global-muted-color !default; +$inverse-link-muted-hover-color: $inverse-global-color !default; +$inverse-link-text-hover-color: $inverse-global-muted-color !default; +$inverse-link-heading-hover-color: $inverse-global-primary-background !default; + + + +// @mixin hook-inverse-link-muted(){} +// @mixin hook-inverse-link-muted-hover(){} +// @mixin hook-inverse-link-text-hover(){} +// @mixin hook-inverse-link-heading-hover(){} -- cgit v1.2.3