feat: Changes to io

Keyword "io" now has many more usage scenarios.

- Default margin for io now 0
- New config value for inline element margin
- Rename first classes
- Io classes integrated to sections and groups
This commit is contained in:
sthag 2025-06-20 17:07:03 +02:00
parent 1a3c25d8b5
commit 2f63dbe2b6
3 changed files with 121 additions and 8 deletions

View file

@ -57,7 +57,7 @@ label + input {
}
input, button, textarea, select {
margin: $margin_io;
margin: $margin_inline;
&[disabled="disabled"],
&[disabled] {
@ -79,6 +79,10 @@ td > textarea {
}
}
.input_io, .button_io, .io_textarea, .io_select {
margin: $margin_io;
}
.input_io, .io_textarea, .io_select {
padding: $space_half;
color: $color_text_io;

View file

@ -1,3 +1,5 @@
@use "sass:map";
// Root
// -----------------------------------------------------------------------------
html {
@ -81,7 +83,16 @@ section {}
// Navigation
// -----------------------------------------------------------------------------
nav {}
nav {
ul {
margin: 0;
&.inline li {
display: inline-block;
}
}
}
// Aside element
// -----------------------------------------------------------------------------
@ -107,6 +118,33 @@ aside {
*:first-child {
margin-top: 0;
}
&.io {
input,
textarea,
select,
button {
display: block;
width: 100%;
}
input {
@extend .input_io;
}
textarea {
@extend .io_textarea;
}
select {
@extend .io_select;
}
button {
@extend .button_io;
}
}
}
// Headings
@ -180,12 +218,26 @@ header {}
}
}
header.io {
z-index: map.get($z-indexes, "content-top");
header,
aside,
footer {
&.io {
.span_solo {
border: $width_border_io solid transparent;
padding: $padding_basic;
}
}
}
header.io,
aside.io {
padding: $space_basic;
h1 {
margin: 0;
input,
button,
textarea,
select {
margin-inline: $space_half;
}
input {
@ -205,6 +257,62 @@ header.io {
}
}
header,
footer {
&.io {
@extend %flex-inline;
align-items: stretch;
}
}
header.io {
z-index: map.get($z-indexes, "content-top");
&>*:last-child *:last-child {
margin-right: 0;
}
&>*:first-child *:first-child {
margin-left: 0;
}
nav,
ul {
@extend %flex-inline;
align-items: stretch;
}
nav li {
margin: 0;
}
nav:last-child {
margin-left: auto;
}
h1 {
margin: 0;
}
}
// Footer
// -----------------------------------------------------------------------------
footer {}
footer {
&.io {
input {
@extend .input_io;
}
textarea {
@extend .io_textarea;
}
select {
@extend .io_select;
}
button {
@extend .button_io;
}
}
}