aboutsummaryrefslogtreecommitdiffstats
path: root/scss/uikit/components/align.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/align.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/align.scss')
-rw-r--r--scss/uikit/components/align.scss142
1 files changed, 142 insertions, 0 deletions
diff --git a/scss/uikit/components/align.scss b/scss/uikit/components/align.scss
new file mode 100644
index 00000000..bee6702b
--- /dev/null
+++ b/scss/uikit/components/align.scss
@@ -0,0 +1,142 @@
+// Name: Align
+// Description: Utilities to align embedded content
+//
+// Component: `uk-align-left-*`
+// `uk-align-right-*`
+// `uk-align-center`
+//
+// ========================================================================
+
+
+// Variables
+// ========================================================================
+
+$align-margin-horizontal: $global-gutter !default;
+$align-margin-vertical: $global-gutter !default;
+
+$align-margin-horizontal-l: $global-medium-gutter !default;
+
+
+/* ========================================================================
+ Component: Align
+ ========================================================================== */
+
+/*
+ * Default
+ */
+
+[class*='uk-align'] {
+ display: block;
+ margin-bottom: $align-margin-vertical;
+}
+
+* + [class*='uk-align'] { margin-top: $align-margin-vertical; }
+
+/*
+ * Center
+ */
+
+.uk-align-center {
+ margin-left: auto;
+ margin-right: auto;
+}
+
+/*
+ * Left/Right
+ */
+
+.uk-align-left {
+ margin-top: 0;
+ margin-right: $align-margin-horizontal;
+ float: left;
+}
+
+.uk-align-right {
+ margin-top: 0;
+ margin-left: $align-margin-horizontal;
+ float: right;
+}
+
+/* Phone landscape and bigger */
+@media (min-width: $breakpoint-small) {
+
+ .uk-align-left\@s {
+ margin-top: 0;
+ margin-right: $align-margin-horizontal;
+ float: left;
+ }
+
+ .uk-align-right\@s {
+ margin-top: 0;
+ margin-left: $align-margin-horizontal;
+ float: right;
+ }
+
+}
+
+/* Tablet landscape and bigger */
+@media (min-width: $breakpoint-medium) {
+
+ .uk-align-left\@m {
+ margin-top: 0;
+ margin-right: $align-margin-horizontal;
+ float: left;
+ }
+
+ .uk-align-right\@m {
+ margin-top: 0;
+ margin-left: $align-margin-horizontal;
+ float: right;
+ }
+
+}
+
+/* Desktop and bigger */
+@media (min-width: $breakpoint-large) {
+
+ .uk-align-left\@l {
+ margin-top: 0;
+ float: left;
+ }
+
+ .uk-align-right\@l {
+ margin-top: 0;
+ float: right;
+ }
+
+ .uk-align-left,
+ .uk-align-left\@s,
+ .uk-align-left\@m,
+ .uk-align-left\@l { margin-right: $align-margin-horizontal-l; }
+
+ .uk-align-right,
+ .uk-align-right\@s,
+ .uk-align-right\@m,
+ .uk-align-right\@l { margin-left: $align-margin-horizontal-l; }
+
+}
+
+/* Large screen and bigger */
+@media (min-width: $breakpoint-xlarge) {
+
+ .uk-align-left\@xl {
+ margin-top: 0;
+ margin-right: $align-margin-horizontal-l;
+ float: left;
+ }
+
+ .uk-align-right\@xl {
+ margin-top: 0;
+ margin-left: $align-margin-horizontal-l;
+ float: right;
+ }
+
+}
+
+
+// Hooks
+// ========================================================================
+
+@if(mixin-exists(hook-align-misc)) {@include hook-align-misc();}
+
+// @mixin hook-align-misc(){} \ No newline at end of file