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/article.scss | 110 +++++++++++++++++++++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100644 scss/uikit/components/article.scss (limited to 'scss/uikit/components/article.scss') diff --git a/scss/uikit/components/article.scss b/scss/uikit/components/article.scss new file mode 100644 index 00000000..3d4011f9 --- /dev/null +++ b/scss/uikit/components/article.scss @@ -0,0 +1,110 @@ +// Name: Article +// Description: Component to create articles +// +// Component: `uk-article` +// +// Sub-objects: `uk-article-title` +// `uk-article-meta` +// +// ======================================================================== + + +// Variables +// ======================================================================== + +$article-margin-top: $global-large-margin !default; + +$article-title-font-size-m: $global-xxlarge-font-size !default; +$article-title-font-size: $article-title-font-size-m * 0.85 !default; +$article-title-line-height: 1.2 !default; + +$article-meta-font-size: $global-small-font-size !default; +$article-meta-line-height: 1.4 !default; +$article-meta-color: $global-muted-color !default; + + +/* ======================================================================== + Component: Article + ========================================================================== */ + +.uk-article { + @if(mixin-exists(hook-article)) {@include hook-article();} +} + +/* + * Micro clearfix + */ + +.uk-article::before, +.uk-article::after { + content: ""; + display: table; +} + +.uk-article::after { clear: both; } + +/* + * Remove margin from the last-child + */ + +.uk-article > :last-child { margin-bottom: 0; } + + +/* Adjacent sibling + ========================================================================== */ + +.uk-article + .uk-article { + margin-top: $article-margin-top; + @if(mixin-exists(hook-article-adjacent)) {@include hook-article-adjacent();} +} + + +/* Title + ========================================================================== */ + +.uk-article-title { + font-size: $article-title-font-size; + line-height: $article-title-line-height; + @if(mixin-exists(hook-article-title)) {@include hook-article-title();} +} + +/* Tablet landscape and bigger */ +@media (min-width: $breakpoint-medium) { + + .uk-article-title { font-size: $article-title-font-size-m; } + +} + + +/* Meta + ========================================================================== */ + +.uk-article-meta { + font-size: $article-meta-font-size; + line-height: $article-meta-line-height; + color: $article-meta-color; + @if(mixin-exists(hook-article-meta)) {@include hook-article-meta();} +} + + +// Hooks +// ======================================================================== + +@if(mixin-exists(hook-article-misc)) {@include hook-article-misc();} + +// @mixin hook-article(){} +// @mixin hook-article-adjacent(){} +// @mixin hook-article-title(){} +// @mixin hook-article-meta(){} +// @mixin hook-article-misc(){} + + +// Inverse +// ======================================================================== + +$inverse-article-meta-color: $inverse-global-muted-color !default; + + + +// @mixin hook-inverse-article-title(){} +// @mixin hook-inverse-article-meta(){} \ No newline at end of file -- cgit v1.2.3