Skip to content

Commit

Permalink
Smart passing headers with padding class
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Dunn committed Nov 6, 2023
1 parent 2ce2606 commit ba16c69
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 11 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ work on old browsers, but the colors might not look right. Update your browsers

This is used as the internal KaithemAutomation CSS framework. See it[(Here on Github Pages!](https://eternityforest.github.io/barrel.css)

Note that the preview is of this master branch, not any particular release.

## Meta tag

You need this customary tag in your HTML or it doesn't scale right on mobile.
Expand Down
25 changes: 15 additions & 10 deletions css/barrel.css
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,6 @@ footer {
--graphical-fg: var(--control-fg);

width: 100%;
padding: 0px;
box-sizing: border-box;
margin: 0px;
flex-grow: 0;
Expand All @@ -267,7 +266,8 @@ header {
}


header>*:only-child {
header>*:only-child,
header>*:only-child>:only-child {
width: 100%;
box-sizing: border-box;
padding: 6px;
Expand All @@ -278,12 +278,16 @@ header>:is(h1, h2, h3, h4):has(button) {
padding: 0px;
}

header:not(.undecorated)>*> :only-child {
header:not(.undecorated)>*> :only-child,
header:not(.undecorated)> :only-child {
border: none;
}

header:not(.undecorated)>.tool-bar:only-child {
gap: var(--padding);
}

header:not(.undecorated)>.tool-bar:only-child>*:not(.specificity-hack) {
margin: var(--padding);
border-radius: var(--control-border-radius);
}

Expand Down Expand Up @@ -453,7 +457,7 @@ table tr th,
table tr td {
border-right: var(--border-width) solid var(--border-color);
border-bottom: var(--border-width) solid var(--border-color);
padding: var(--padding);
padding: calc(var(--padding)/3);
}

table tr th:first-child,
Expand Down Expand Up @@ -949,6 +953,11 @@ iframe.h-center {
padding: var(--padding);
}

header.padding,
footer.padding {
padding: calc(max(4px, calc(var(--padding) / 3)));
}

.font-normal {
font-style: normal;
}
Expand Down Expand Up @@ -1089,10 +1098,6 @@ iframe.h-center {

/*Classless styles */

p{
padding-inline-start: var(--padding);
}

blockquote {
white-space: pre-wrap;
border-left: 3px solid var(--graphical-fg);
Expand All @@ -1109,7 +1114,7 @@ a {
text-decoration-style: dotted;
text-decoration-thickness: 1.2px;
color: color-mix(in srgb, var(--accent-color) 70%, var(--fg));
text-decoration-color:color-mix(in srgb, var(--accent-color) 38%, rgb(0 0 0 / 0%));
text-decoration-color: color-mix(in srgb, var(--accent-color) 38%, rgb(0 0 0 / 0%));
}


Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<body>
<main>
<section class="window paper">
<header>Look! A Header</header>
<header class="padding">Look! A Header</header>

<h2>Basic Page</h2>
<p>This is a simple test page for barrel.css</p>
Expand Down

0 comments on commit ba16c69

Please sign in to comment.