summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDeniz Akşimşek <deniz@denizaksimsek.com>2022-05-17 10:20:21 +0300
committerDeniz Akşimşek <deniz@denizaksimsek.com>2022-05-17 10:20:21 +0300
commitb20b927e3291fd7a5c6022a6c5ccc113abe54886 (patch)
treec7ebceac302fa93aae9b85758604e3117de68d94
parentaa952b5b64539acf6fa86a867e823b4fc26f17cd (diff)
downloadmissing-b20b927e3291fd7a5c6022a6c5ccc113abe54886.tar.gz
missing-b20b927e3291fd7a5c6022a6c5ccc113abe54886.zip
add .center
-rw-r--r--src/util/layout.css8
-rw-r--r--www/docs/layout.md4
2 files changed, 12 insertions, 0 deletions
diff --git a/src/util/layout.css b/src/util/layout.css
index df3467a..85714dc 100644
--- a/src/util/layout.css
+++ b/src/util/layout.css
@@ -53,6 +53,14 @@
/**/
+.center {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+}
+
+/**/
+
.fixed { position: fixed }
.sticky { position: sticky }
diff --git a/www/docs/layout.md b/www/docs/layout.md
index 830abbe..b75e283 100644
--- a/www/docs/layout.md
+++ b/www/docs/layout.md
@@ -45,6 +45,10 @@ container and span the whole width of the viewport.
Add some padding with <dfn>`.pad`</dfn>.
+## Center
+
+<dfn>`.center`</dfn> does what you'd expect, in both axes.
+
## Fixed Positioning
<dfn>`fixed`</dfn>