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/slider.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/slider.scss')
-rw-r--r-- | scss/uikit/components/slider.scss | 99 |
1 files changed, 99 insertions, 0 deletions
diff --git a/scss/uikit/components/slider.scss b/scss/uikit/components/slider.scss new file mode 100644 index 00000000..2799868e --- /dev/null +++ b/scss/uikit/components/slider.scss @@ -0,0 +1,99 @@ +// Name: Slider +// Description: Component to create horizontal sliders +// +// Component: `uk-slider` +// +// Sub-objects: `uk-slider-container` +// `uk-slider-items` +// +// States: `uk-active` +// +// ======================================================================== + + +/* ======================================================================== + Component: Slider + ========================================================================== */ + +/* + * 1. Prevent tab highlighting on iOS. + */ + +.uk-slider { + /* 1 */ + -webkit-tap-highlight-color: transparent; + @if(mixin-exists(hook-slider)) {@include hook-slider();} +} + + +/* Container + ========================================================================== */ + +/* + * 1. Clip child elements + */ + +.uk-slider-container { + /* 1 */ + overflow: hidden; +} + +/* Items + ========================================================================== */ + +/* + * 1. Optimize animation + * 2. Create a containing block. In Safari it's neither created by `transform` nor `will-change`. + */ + +.uk-slider-items { + /* 1 */ + will-change: transform; + /* 2 */ + position: relative; +} + +/* + * 1. Reset list style without interfering with grid + * 2. Prevent displaying the callout information on iOS. + */ + +.uk-slider-items:not(.uk-grid) { + display: flex; + /* 1 */ + margin: 0; + padding: 0; + list-style: none; + /* 2 */ + -webkit-touch-callout: none; +} + +.uk-slider-items.uk-grid { flex-wrap: nowrap; } + + +/* Item + ========================================================================== */ + +/* + * 1. Let items take content dimensions (0 0 auto) + * 2. Create position context + * 3. Disable horizontal panning gestures in IE11 and Edge + */ + +.uk-slider-items > * { + /* 1 */ + flex: none; + /* 2 */ + position: relative; + /* 3 */ + touch-action: pan-y; +} + + +// Hooks +// ======================================================================== + +@if(mixin-exists(hook-slider-misc)) {@include hook-slider-misc();} + +// @mixin hook-slider(){} +// @mixin hook-slider-misc(){} |