mirror of
https://github.com/thangisme/notes.git
synced 2025-02-21 06:57:46 -05:00
Add additional layout and text justifcations
This commit is contained in:
parent
2f13db1f01
commit
411c508806
@ -53,6 +53,14 @@ li {
|
||||
font-family: $mono-font-family !important;
|
||||
}
|
||||
|
||||
.text-left {
|
||||
text-align: left !important;
|
||||
}
|
||||
|
||||
.text-center {
|
||||
text-align: center !important;
|
||||
}
|
||||
|
||||
.text-right {
|
||||
text-align: right !important;
|
||||
}
|
||||
|
@ -47,6 +47,32 @@
|
||||
}
|
||||
}
|
||||
|
||||
// Horizontal alignment
|
||||
|
||||
.float-left {
|
||||
float: left !important;
|
||||
}
|
||||
|
||||
.float-right {
|
||||
float: right !important;
|
||||
}
|
||||
|
||||
.flex-justify-start {
|
||||
justify-content: flex-start !important;
|
||||
}
|
||||
|
||||
.flex-justify-end {
|
||||
justify-content: flex-end !important;
|
||||
}
|
||||
|
||||
.flex-justify-between {
|
||||
justify-content: space-between !important;
|
||||
}
|
||||
|
||||
.flex-justify-around {
|
||||
justify-content: space-around !important;
|
||||
}
|
||||
|
||||
// Vertical alignment
|
||||
|
||||
.v-align-baseline {
|
||||
|
@ -7,6 +7,11 @@
|
||||
|
||||
// Margin spacer utilities
|
||||
|
||||
.mx-auto {
|
||||
margin-right: auto !important;
|
||||
margin-left: auto !important;
|
||||
}
|
||||
|
||||
@for $i from 1 through length($spacers) {
|
||||
$size: #{map-get($spacers, sp-#{$i - 1})};
|
||||
$scale: #{$i - 1};
|
||||
@ -42,11 +47,10 @@
|
||||
margin-right: -#{$size} !important;
|
||||
margin-left: -#{$size} !important;
|
||||
}
|
||||
}
|
||||
|
||||
.mx-auto {
|
||||
margin-right: auto !important;
|
||||
margin-left: auto !important;
|
||||
.mx-#{$scale}-auto {
|
||||
margin-right: auto !important;
|
||||
margin-left: auto !important;
|
||||
}
|
||||
}
|
||||
|
||||
@each $media-query in map-keys($media-queries) {
|
||||
|
@ -51,6 +51,9 @@ Spacing values are based on a `1rem = 16px` spacing scale, broken down into thes
|
||||
| `6` | 2rem | 32px |
|
||||
| `7` | 2.5rem | 40px |
|
||||
| `8` | 3rem | 48px |
|
||||
| `auto` | auto | auto |
|
||||
|
||||
Use `mx-auto` to horizontally center elements.
|
||||
|
||||
#### Examples
|
||||
{: .no_toc }
|
||||
@ -65,6 +68,19 @@ This paragraph will have 2rem/32px of padding on the right and left at all scree
|
||||
{: .px-6 }
|
||||
```
|
||||
|
||||
## Horizontal Alignment
|
||||
|
||||
| Classname | What it does |
|
||||
|:------------------------|:---------------------------------|
|
||||
| `.float-left` | `float: left` |
|
||||
| `.float-right` | `float: right` |
|
||||
| `.flex-justify-start` | `justify-content: flex-start` |
|
||||
| `.flex-justify-end` | `justify-content: flex-end` |
|
||||
| `.flex-justify-between` | `justify-content: space-between` |
|
||||
| `.flex-justify-around` | `justify-content: space-around` |
|
||||
|
||||
Note any of the `flex-` classes must be used on a parent element that has `d-flex` applied to it.
|
||||
|
||||
## Vertical Alignment
|
||||
|
||||
| Classname | What it does |
|
||||
|
@ -144,3 +144,13 @@ Default line height
|
||||
Default line height
|
||||
{: .fh-default }
|
||||
```
|
||||
|
||||
## Text justification
|
||||
|
||||
By default text is justified left. Use these `text-` classes to override settings:
|
||||
|
||||
| Class | What it does |
|
||||
|:---------------|:---------------------|
|
||||
| `.text-left` | `text-align: left` |
|
||||
| `.text-right` | `text-align: right` |
|
||||
| `.text-center` | `text-align: center` |
|
||||
|
Loading…
x
Reference in New Issue
Block a user