summaryrefslogtreecommitdiff
path: root/_sass/yat/_base.scss
diff options
context:
space:
mode:
Diffstat (limited to '_sass/yat/_base.scss')
-rw-r--r--_sass/yat/_base.scss39
1 files changed, 30 insertions, 9 deletions
diff --git a/_sass/yat/_base.scss b/_sass/yat/_base.scss
index 15eacde..e92c561 100644
--- a/_sass/yat/_base.scss
+++ b/_sass/yat/_base.scss
@@ -227,15 +227,6 @@ table {
}
/**
- * Vertical center
- */
-%vertical-center {
- position: absolute;
- top: 50%;
- transform: translateY(-50%);
-}
-
-/**
* Flex layout
*/
%flex-layout {
@@ -256,3 +247,33 @@ table {
transform: scale(0.9999); /* <-- fix the sticky x overflow issue */
top: $top;
}
+
+/**
+ * Vertical center
+ */
+@mixin vertical-center($position) {
+ position: $position;
+ top: 50%;
+ transform: translateY(-50%);
+}
+
+/**
+ * Horizontal center
+ */
+@mixin horizontal-center($position) {
+ position: $position;
+ left: 50%;
+ transform: translateX(-50%);
+}
+
+/**
+ * Center background image
+ */
+@mixin center-image {
+ height: 100%;
+ max-width: 1000%;
+ background-size: cover;
+ background-position: center center;
+ overflow: hidden;
+}
+