1
0
mirror of https://github.com/Chalarangelo/mini.css.git synced 2025-08-06 22:06:30 +02:00

Header styling

Missing logo, but buttons work perfectly fine.
This commit is contained in:
Angelos Chalaris
2017-11-07 20:29:04 +02:00
parent a45ae848f8
commit 58f505e8ba
5 changed files with 341 additions and 45 deletions

View File

@@ -110,3 +110,6 @@
- Bundled up `[disabled]` styling for all elements in `input_control` as this should now be the default behavior of the code.
- Dealt with #114. It shouldn't be a problem anymore.
- Added mixins for `button` elements in `input_control`. They should now be perfectly usable.
- Removed `header` `display` fix as it was targeting IE 9-.
- Implemented `header` and links/buttons in it, `logo` is still missing.
- Implemented `.sticky` for all `navigation` elements that needed it.

View File

@@ -8,7 +8,7 @@
--fore-color: #111;
--secondary-fore-color: #444;
--back-color: #f8f8f8;
--secondary-back-color: #eee;
--secondary-back-color: #f0f0f0;
--blockquote-color: #f57c00;
--pre-color: #1565c0;
--border-color: #aaa;
@@ -25,6 +25,10 @@ html {
font-size: 16px;
}
a, b, del, em, i, ins, q, span, strong, u {
font-size: 1em;
}
html, * {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, "Helvetica Neue", Helvetica, sans-serif;
line-height: 1.5;
@@ -589,6 +593,17 @@ a:hover, a:focus {
/*
Definitions for forms and input elements.
*/
/* Input_control module CSS variable definitions */
:root {
--input-focus-color: #0288d1;
--input-invalid-color: #d32f2f;
--button-back-color: #e2e2e2;
--button-hover-back-color: #dcdcdc;
--button-fore-color: #212121;
--button-border-color: transparent;
--button-hover-border-color: transparent;
}
form {
background: var(--secondary-back-color);
border: 0.0625rem solid var(--secondary-border-color);
@@ -604,6 +619,201 @@ fieldset {
padding: var(--universal-padding);
}
legend {
box-sizing: border-box;
display: table;
max-width: 100%;
white-space: normal;
font-weight: 700;
padding: calc(var(--universal-padding) / 2);
}
label {
padding: calc(var(--universal-padding) / 2) var(--universal-padding);
}
.input-group {
display: inline-block;
}
.input-group.fluid {
display: flex;
align-items: center;
justify-content: center;
}
.input-group.fluid > input {
flex-grow: 1;
flex-basis: 0px;
}
@media screen and (max-width: 767px) {
.input-group.fluid {
align-items: stretch;
flex-direction: column;
}
}
.input-group.vertical {
display: flex;
align-items: stretch;
flex-direction: column;
}
.input-group.vertical > input {
flex-grow: 1;
flex-basis: 0px;
}
[type="number"]::-webkit-inner-spin-button, [type="number"]::-webkit-outer-spin-button {
height: auto;
}
[type="search"] {
-webkit-appearance: textfield;
outline-offset: -2px;
}
[type="search"]::-webkit-search-cancel-button,
[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
}
input:not([type]), [type="text"], [type="email"], [type="number"], [type="search"],
[type="password"], [type="url"], [type="tel"], textarea, select {
box-sizing: border-box;
background: var(--back-color);
color: var(--fore-color);
border: 0.0625rem solid var(--secondary-border-color);
border-radius: var(--universal-border-radius);
margin: calc(var(--universal-margin) / 2);
padding: var(--universal-padding) calc(1.5 * var(--universal-padding));
}
input:not([type="button"]):not([type="submit"]):not([type="reset"]):hover, input:not([type="button"]):not([type="submit"]):not([type="reset"]):focus, textarea:hover, textarea:focus, select:hover, select:focus {
border-color: var(--input-focus-color);
box-shadow: none;
}
input:not([type="button"]):not([type="submit"]):not([type="reset"]):invalid, input:not([type="button"]):not([type="submit"]):not([type="reset"]):focus:invalid, textarea:invalid, textarea:focus:invalid, select:invalid, select:focus:invalid {
border-color: var(--input-invalid-color);
box-shadow: none;
}
input:not([type="button"]):not([type="submit"]):not([type="reset"])[readonly], textarea[readonly], select[readonly] {
background: var(--secondary-back-color);
}
select {
max-width: 100%;
}
option {
overflow: hidden;
text-overflow: ellipsis;
}
:placeholder-shown {
color: var(--fore-color);
}
::-ms-placeholder {
color: var(--fore-color);
opacity: 0.54;
}
button::-moz-focus-inner, [type="button"]::-moz-focus-inner, [type="reset"]::-moz-focus-inner, [type="submit"]::-moz-focus-inner {
border-style: none;
padding: 0;
}
button, html [type="button"], [type="reset"], [type="submit"] {
-webkit-appearance: button;
}
button {
overflow: visible;
text-transform: none;
}
button, [type="button"], [type="submit"], [type="reset"],
a.button, label.button, .button,
a[role="button"], label[role="button"], [role="button"] {
display: inline-block;
background: var(--button-back-color);
color: var(--button-fore-color);
border: 0.0625rem solid var(--button-border-color);
border-radius: var(--universal-border-radius);
padding: var(--universal-padding) calc(1.5 * var(--universal-padding));
margin: var(--universal-margin);
text-decoration: none;
cursor: pointer;
transition: background 0.3s;
}
button:hover, button:focus, [type="button"]:hover, [type="button"]:focus, [type="submit"]:hover, [type="submit"]:focus, [type="reset"]:hover, [type="reset"]:focus,
a.button:hover,
a.button:focus, label.button:hover, label.button:focus, .button:hover, .button:focus,
a[role="button"]:hover,
a[role="button"]:focus, label[role="button"]:hover, label[role="button"]:focus, [role="button"]:hover, [role="button"]:focus {
background: var(--button-hover-back-color);
border-color: var(--button-hover-border-color);
}
input:disabled, input[disabled], textarea:disabled, textarea[disabled], select:disabled, select[disabled], button:disabled, button[disabled], .button:disabled, .button[disabled], [role="button"]:disabled, [role="button"][disabled] {
cursor: not-allowed;
opacity: 0.75;
}
/*
Definitions for navigation elements.
*/
/* Navigation module CSS variable definitions */
:root {
--header-back-color: #f8f8f8;
--header-hover-back-color: #f0f0f0;
--header-fore-color: #444;
--header-border-color: #ddd;
}
header {
height: 3.1875rem;
background: var(--header-back-color);
color: var(--header-fore-color);
border-bottom: 0.0625rem solid var(--header-border-color);
padding: calc(var(--universal-padding) / 4) 0;
white-space: nowrap;
overflow-x: auto;
overflow-y: hidden;
}
header.row {
box-sizing: content-box;
}
header button, header [type="button"],
header a.button, header label.button, header .button,
header a[role="button"], header label[role="button"], header [role="button"] {
position: relative;
top: calc(0rem - var(--universal-padding) / 4);
height: calc(100% + var(--universal-padding) / 2);
background: var(--header-back-color);
color: var(--header-fore-color);
border: 0;
border-radius: 0;
vertical-align: top;
margin: 0;
text-transform: uppercase;
}
header button:hover, header button:focus, header [type="button"]:hover, header [type="button"]:focus,
header a.button:hover,
header a.button:focus, header label.button:hover, header label.button:focus, header .button:hover, header .button:focus,
header a[role="button"]:hover,
header a[role="button"]:focus, header label[role="button"]:hover, header label[role="button"]:focus, header [role="button"]:hover, header [role="button"]:focus {
background: var(--header-hover-back-color);
}
:not(.doc) {
font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, "Helvetica Neue", Helvetica, sans-serif;
}
@@ -732,28 +942,6 @@ p.splash {
cursor: pointer;
}
header {
display: block;
height: 3.25rem;
background: #f8f8f8;
color: #444;
padding: 0.125rem 0.5rem;
white-space: nowrap;
overflow-x: auto;
overflow-y: hidden;
position: sticky;
border-bottom: 1px solid #ddd;
top: 0;
text-transform: uppercase;
line-height: 3.5rem;
font-weight: 500;
cursor: pointer;
}
header:hover {
color: #111;
}
[type="checkbox"], [type="radio"] {
height: 1px;
width: 1px;