aboutsummaryrefslogtreecommitdiffstats
path: root/scss/uikit/components/thumbnav.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/thumbnav.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/thumbnav.scss')
-rw-r--r--scss/uikit/components/thumbnav.scss123
1 files changed, 123 insertions, 0 deletions
diff --git a/scss/uikit/components/thumbnav.scss b/scss/uikit/components/thumbnav.scss
new file mode 100644
index 00000000..ee551f99
--- /dev/null
+++ b/scss/uikit/components/thumbnav.scss
@@ -0,0 +1,123 @@
+// Name: Thumbnav
+// Description: Component to create thumbnail navigations
+//
+// Component: `uk-thumbnav`
+//
+// Modifier: `uk-thumbnav-vertical`
+//
+// States: `uk-active`
+//
+// ========================================================================
+
+
+// Variables
+// ========================================================================
+
+$thumbnav-margin-horizontal: 15px !default;
+$thumbnav-margin-vertical: $thumbnav-margin-horizontal !default;
+
+
+/* ========================================================================
+ Component: Thumbnav
+ ========================================================================== */
+
+/*
+ * 1. Allow items to wrap into the next line
+ * 2. Reset list
+ * 3. Gutter
+ */
+
+.uk-thumbnav {
+ display: flex;
+ /* 1 */
+ flex-wrap: wrap;
+ /* 2 */
+ margin: 0;
+ padding: 0;
+ list-style: none;
+ /* 3 */
+ margin-left: (-$thumbnav-margin-horizontal);
+ @if(mixin-exists(hook-thumbnav)) {@include hook-thumbnav();}
+}
+
+/*
+ * 1. Space is allocated solely based on content dimensions: 0 0 auto
+ * 2. Gutter
+ */
+
+.uk-thumbnav > * {
+ /* 1 */
+ flex: none;
+ /* 2 */
+ padding-left: $thumbnav-margin-horizontal;
+}
+
+
+/* Items
+ ========================================================================== */
+
+/*
+ * Items
+ */
+
+.uk-thumbnav > * > * {
+ display: inline-block;
+ @if(mixin-exists(hook-thumbnav-item)) {@include hook-thumbnav-item();}
+}
+
+/* Hover + Focus */
+.uk-thumbnav > * > :hover,
+.uk-thumbnav > * > :focus {
+ outline: none;
+ @if(mixin-exists(hook-thumbnav-item-hover)) {@include hook-thumbnav-item-hover();}
+}
+
+/* Active */
+.uk-thumbnav > .uk-active > * {
+ @if(mixin-exists(hook-thumbnav-item-active)) {@include hook-thumbnav-item-active();}
+}
+
+
+/* Modifier: 'uk-thumbnav-vertical'
+ ========================================================================== */
+
+/*
+ * 1. Change direction
+ * 2. Gutter
+ */
+
+.uk-thumbnav-vertical {
+ /* 1 */
+ flex-direction: column;
+ /* 2 */
+ margin-left: 0;
+ margin-top: (-$thumbnav-margin-vertical);
+}
+
+/* 2 */
+.uk-thumbnav-vertical > * {
+ padding-left: 0;
+ padding-top: $thumbnav-margin-vertical;
+}
+
+
+// Hooks
+// ========================================================================
+
+@if(mixin-exists(hook-thumbnav-misc)) {@include hook-thumbnav-misc();}
+
+// @mixin hook-thumbnav(){}
+// @mixin hook-thumbnav-item(){}
+// @mixin hook-thumbnav-item-hover(){}
+// @mixin hook-thumbnav-item-active(){}
+// @mixin hook-thumbnav-misc(){}
+
+
+// Inverse
+// ========================================================================
+
+
+
+// @mixin hook-inverse-thumbnav-item(){}
+// @mixin hook-inverse-thumbnav-item-hover(){}
+// @mixin hook-inverse-thumbnav-item-active(){} \ No newline at end of file