@@ -87,6 +87,15 @@ User the `flex-wrap` class, if you want your flex items to break onto a new line
.flex-wrap { flex-wrap: wrap; }
```
+If you need single items to grow or shrink, use the `grow` and `shrink` classes. If you want to prevent them from growing or shrinking, use `grow-0` or `shrink-0` respectively.
+
+```css
+.grow { flex-grow: 1; }
+.shrink { flex-shrink: 1; }
+.grow-0 { flex-grow: 0; }
+.shrink-0 { flex-shrink: 0; }
+```
+
### Grid
Grid based layouts can be used if a more table-based layout is needed. Use the `grid` class in combination with the `grid-cols-{n}` classes to define a basic grid.
diff --git a/docs/pages/utilities/positioning.md b/docs/pages/utilities/positioning.md
index eb55fda..0418032 100644
--- a/docs/pages/utilities/positioning.md
+++ b/docs/pages/utilities/positioning.md
@@ -1,7 +1,7 @@
---
title: 'Utilities: Positioning - Sloth.css'
description: Controlling position, alignment and overflow of elements
-tags: relative absolute fixed sticky items-center items-start items-end items-stretch flex-center scroll overflow-hidden overflow-visible overflow-auto overflow-x-auto overflow-y-auto
+tags: relative absolute fixed sticky items-center items-start items-end items-stretch flex-center scroll overflow-hidden overflow-visible overflow-auto overflow-x-auto overflow-y-auto justify-start justify-center justify-end justify-between justify-around justify-evenly
---
## Positioning
@@ -119,6 +119,14 @@ Flex and grid items can be aligned on the [cross axis](https://developer.mozilla
Flex and grid items can be aligned on the [main axis](https://developer.mozilla.org/en-US/docs/Glossary/Main_Axis) / inline axis using `justify-*` classes.
+
#1
@@ -127,6 +135,14 @@ Flex and grid items can be aligned on the [main axis](https://developer.mozilla.
.justify-center
+
#1
@@ -143,13 +159,23 @@ Flex and grid items can be aligned on the [main axis](https://developer.mozilla.
.justify-around
+
```html
-
...
-
...
-
...
-
...
+
...
+
...
+
...
+
...
+
...
+
...
```
For centering content horizontally and vertically, the special utility class `flex-center` is provided.
diff --git a/docs/pages/utilities/text.md b/docs/pages/utilities/text.md
index 601473e..7944424 100644
--- a/docs/pages/utilities/text.md
+++ b/docs/pages/utilities/text.md
@@ -142,6 +142,7 @@ Font stacks can be overwritten by the corresponding custom property:
The Sloth is a lazy mammal. .text-base
The Sloth is a lazy mammal. .text-lg
The Sloth is a lazy mammal. .text-xl
+
The Sloth is a lazy mammal. .text-2xl
```html
@@ -150,14 +151,16 @@ Font stacks can be overwritten by the corresponding custom property:
...
...
...
+
...
```
```css
-.text-xs { font-size: 0.75rem; line-height: 1rem; }
-.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
-.text-base { font-size: 1rem; line-height: 1.5rem; }
-.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
-.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
+.text-xs { font-size: 0.75rem; line-height: 1rem; }
+.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
+.text-base { font-size: 1rem; line-height: 1.5rem; }
+.text-lg { font-size: 1.25rem; line-height: 1.75rem; }
+.text-xl { font-size: 1.5rem; line-height: 1.875rem; }
+.text-2xl { font-size: 2rem; line-height: 2.25rem; }
```
The basic font size that defines all `rem` based properties (which are almost all size based properties) can be overwritten by the corresponding custom property. Only adjust this if necessary for your use case (it might make everything too big or too small).
diff --git a/src/_config.css b/src/_config.css
index ca0ae71..694d6cd 100644
--- a/src/_config.css
+++ b/src/_config.css
@@ -53,7 +53,7 @@
/* Shadows */
--shadow-border: 0 0 0 1px inset;
- --shadow-inset: 0 2px .25rem 0 inset;
+ --shadow-inset: 0 3px .25rem 0 inset;
--shadow-float: 0 .25rem .75rem -.4rem;
/* Borders */
diff --git a/src/_utilities.css b/src/_utilities.css
index 807ca05..a7f9cf9 100644
--- a/src/_utilities.css
+++ b/src/_utilities.css
@@ -135,6 +135,18 @@
.flex-wrap {
flex-wrap: wrap;
}
+.grow {
+ flex-grow: 1;
+}
+.shrink {
+ flex-shrink: 1;
+}
+.grow-0 {
+ flex-grow: 0;
+}
+.shrink-0 {
+ flex-shrink: 0;
+}
.invisible {
visibility: hidden;
}
@@ -191,15 +203,24 @@
.items-stretch {
align-items: stretch;
}
+.justify-start {
+ justify-content: start;
+}
.justify-center {
justify-content: center;
}
+.justify-end {
+ justify-content: end;
+}
.justify-between {
justify-content: space-between;
}
.justify-around {
justify-content: space-around;
}
+.justify-evenly {
+ justify-content: space-evenly;
+}
.flex-center {
display: flex;
align-items: center;
@@ -374,12 +395,16 @@
line-height: 1.5rem;
}
.text-lg {
- font-size: 1.125rem;
+ font-size: 1.25rem;
line-height: 1.75rem;
}
.text-xl {
- font-size: 1.25rem;
- line-height: 1.75rem;
+ font-size: 1.5rem;
+ line-height: 1.875rem;
+}
+.text-2xl {
+ font-size: 2rem;
+ line-height: 2.25rem;
}
.truncate {
overflow: hidden;
diff --git a/src/core/_form.css b/src/core/_form.css
index 85ad073..9e4d677 100644
--- a/src/core/_form.css
+++ b/src/core/_form.css
@@ -26,14 +26,18 @@ label {
/*
,