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/overlay.scss | 85 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 scss/uikit/components/overlay.scss (limited to 'scss/uikit/components/overlay.scss') diff --git a/scss/uikit/components/overlay.scss b/scss/uikit/components/overlay.scss new file mode 100644 index 00000000..c3eb0a57 --- /dev/null +++ b/scss/uikit/components/overlay.scss @@ -0,0 +1,85 @@ +// Name: Overlay +// Description: Component to create content areas overlaying an image +// +// Component: `uk-overlay` +// +// Adopted: `uk-overlay-icon` +// +// Modifier: `uk-overlay-default` +// `uk-overlay-primary` +// +// ======================================================================== + + +// Variables +// ======================================================================== + +$overlay-padding-horizontal: $global-gutter !default; +$overlay-padding-vertical: $global-gutter !default; + +$overlay-default-background: rgba($global-background, 0.8) !default; + +$overlay-primary-background: rgba($global-secondary-background, 0.8) !default; +$overlay-primary-color-mode: light !default; + + +/* ======================================================================== + Component: Overlay + ========================================================================== */ + +.uk-overlay { + padding: $overlay-padding-vertical $overlay-padding-horizontal; + @if(mixin-exists(hook-overlay)) {@include hook-overlay();} +} + +/* + * Remove margin from the last-child + */ + +.uk-overlay > :last-child { margin-bottom: 0; } + + +/* Icon + ========================================================================== */ + +.uk-overlay-icon { + @if(mixin-exists(hook-overlay-icon)) {@include hook-overlay-icon();} +} + + +/* Style modifiers + ========================================================================== */ + +/* + * Default + */ + +.uk-overlay-default { + background: $overlay-default-background; + @if(mixin-exists(hook-overlay-default)) {@include hook-overlay-default();} +} + +/* + * Primary + */ + +.uk-overlay-primary { + background: $overlay-primary-background; + @if(mixin-exists(hook-overlay-primary)) {@include hook-overlay-primary();} +} + +// Color Mode +@if ( $overlay-primary-color-mode == light ) { .uk-overlay-primary { @extend .uk-light !optional;} } +@if ( $overlay-primary-color-mode == dark ) { .uk-overlay-primary { @extend .uk-dark !optional;} } + + +// Hooks +// ======================================================================== + +@if(mixin-exists(hook-overlay-misc)) {@include hook-overlay-misc();} + +// @mixin hook-overlay(){} +// @mixin hook-overlay-icon(){} +// @mixin hook-overlay-default(){} +// @mixin hook-overlay-primary(){} +// @mixin hook-overlay-misc(){} -- cgit v1.2.3