diff options
author | 2018-06-05 16:07:35 +0100 | |
---|---|---|
committer | 2018-06-05 16:07:35 +0100 | |
commit | 13a3c1e29473aa9f563e8db4ad94cb3eee9bdfe6 (patch) | |
tree | 290c6d668ec9161a39065456a33ec634215907cc /scss/uikit/components/accordion.scss | |
parent | documentation 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/accordion.scss')
-rw-r--r-- | scss/uikit/components/accordion.scss | 118 |
1 files changed, 118 insertions, 0 deletions
diff --git a/scss/uikit/components/accordion.scss b/scss/uikit/components/accordion.scss new file mode 100644 index 00000000..bfb0e815 --- /dev/null +++ b/scss/uikit/components/accordion.scss @@ -0,0 +1,118 @@ +// Name: Accordion +// Description: Component to create accordions +// +// Component: `uk-accordion` +// +// Sub-objects: `uk-accordion-title` +// `uk-accordion-content` +// +// States: `uk-open` +// +// ======================================================================== + + +// Variables +// ======================================================================== + +$accordion-item-margin-top: $global-margin !default; + +$accordion-title-font-size: $global-medium-font-size !default; +$accordion-title-line-height: 1.4 !default; +$accordion-title-color: $global-emphasis-color !default; +$accordion-title-hover-color: $global-color !default; + +$accordion-content-margin-top: $global-margin !default; + + +/* ======================================================================== + Component: Accordion + ========================================================================== */ + +.uk-accordion { + padding: 0; + list-style: none; + @if(mixin-exists(hook-accordion)) {@include hook-accordion();} +} + + +/* Item + ========================================================================== */ + +.uk-accordion > :nth-child(n+2) { + margin-top: $accordion-item-margin-top; + @if(mixin-exists(hook-accordion-item)) {@include hook-accordion-item();} +} + + +/* Title + ========================================================================== */ + +.uk-accordion-title { + display: block; + font-size: $accordion-title-font-size; + line-height: $accordion-title-line-height; + color: $accordion-title-color; + @if(mixin-exists(hook-accordion-title)) {@include hook-accordion-title();} +} + +/* Hover + Focus */ +.uk-accordion-title:hover, +.uk-accordion-title:focus { + color: $accordion-title-hover-color; + text-decoration: none; + outline: none; + @if(mixin-exists(hook-accordion-title-hover)) {@include hook-accordion-title-hover();} +} + + +/* Content + ========================================================================== */ + +.uk-accordion-content { + margin-top: $accordion-content-margin-top; + @if(mixin-exists(hook-accordion-content)) {@include hook-accordion-content();} +} + +/* + * Micro clearfix + */ + +.uk-accordion-content::before, +.uk-accordion-content::after { + content: ""; + display: table; +} + +.uk-accordion-content::after { clear: both; } + +/* + * Remove margin from the last-child + */ + + .uk-accordion-content > :last-child { margin-bottom: 0; } + + +// Hooks +// ======================================================================== + +@if(mixin-exists(hook-accordion-misc)) {@include hook-accordion-misc();} + +// @mixin hook-accordion(){} +// @mixin hook-accordion-item(){} +// @mixin hook-accordion-title(){} +// @mixin hook-accordion-title-hover(){} +// @mixin hook-accordion-content(){} +// @mixin hook-accordion-misc(){} + + +// Inverse +// ======================================================================== + +$inverse-accordion-title-color: $inverse-global-emphasis-color !default; +$inverse-accordion-title-hover-color: $inverse-global-inverse-color !default; + + + +// @mixin hook-inverse-accordion-item(){} +// @mixin hook-inverse-accordion-title(){} +// @mixin hook-inverse-accordion-title-hover(){}
\ No newline at end of file |