refonte des styles de formulaires
This commit is contained in:
parent
30106e8b7a
commit
4308dc1d19
2 changed files with 59 additions and 27 deletions
|
@ -4,6 +4,7 @@
|
||||||
- refonte complète des boutons, avec possibilités de variantes (primary, success, warning, etc.)
|
- refonte complète des boutons, avec possibilités de variantes (primary, success, warning, etc.)
|
||||||
- ajout des badges (tags), avec possibilités de variantes (primary, success, warning, etc.)
|
- ajout des badges (tags), avec possibilités de variantes (primary, success, warning, etc.)
|
||||||
- ajout des alertes, avec possibilités de variantes (primary, success, warning, etc.)
|
- ajout des alertes, avec possibilités de variantes (primary, success, warning, etc.)
|
||||||
|
- refonte des styles de formulaires
|
||||||
- autogrid object en Grid Layout
|
- autogrid object en Grid Layout
|
||||||
- regroupement des styles des tableaux
|
- regroupement des styles des tableaux
|
||||||
- suppression du namespace "kna-", ne devrait pas être problématique dès lors que Grillade sera devenu inutile dans KNACSS
|
- suppression du namespace "kna-", ne devrait pas être problématique dès lors que Grillade sera devenu inutile dans KNACSS
|
||||||
|
|
|
@ -1,10 +1,7 @@
|
||||||
/* ----------------------------- */
|
/* ----------------------------- */
|
||||||
/* ==Forms */
|
/* ==Forms */
|
||||||
/* ----------------------------- */
|
/* ----------------------------- */
|
||||||
/* thanks to HTML5boilerplate,
|
/* thanks to HTML5boilerplate and https://shoelace.style/ */
|
||||||
* github.com/nathansmith/formalize and www.sitepen.com
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/* forms items */
|
/* forms items */
|
||||||
form,
|
form,
|
||||||
|
@ -12,45 +9,74 @@ fieldset {
|
||||||
border: none;
|
border: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
input,
|
fieldset {
|
||||||
select,
|
padding: $medium-value;
|
||||||
label {
|
|
||||||
font-family: inherit;
|
|
||||||
font-size: inherit;
|
|
||||||
}
|
|
||||||
|
|
||||||
input,
|
& legend {
|
||||||
optgroup,
|
padding: 0 $tiny-value;
|
||||||
select,
|
border: 0;
|
||||||
textarea {
|
white-space: normal;
|
||||||
color: $color-base;
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
label {
|
label {
|
||||||
|
display: inline-block;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
legend {
|
input[type="color"],
|
||||||
border: 0;
|
input[type="date"],
|
||||||
white-space: normal;
|
input[type="datetime-local"],
|
||||||
|
input[type="email"],
|
||||||
|
input[type="month"],
|
||||||
|
input[type="number"],
|
||||||
|
input[type="password"],
|
||||||
|
input[type="search"],
|
||||||
|
input[type="tel"],
|
||||||
|
input[type="text"],
|
||||||
|
input[type="time"],
|
||||||
|
input[type="url"],
|
||||||
|
input[type="week"],
|
||||||
|
select,
|
||||||
|
textarea {
|
||||||
|
font-family: inherit;
|
||||||
|
font-size: inherit;
|
||||||
|
color: $color-base;
|
||||||
|
vertical-align: middle;
|
||||||
|
padding: $tiny-value $small-value;
|
||||||
|
margin: 0;
|
||||||
|
transition: 0.25s;
|
||||||
|
transition-property: box-shadow, background-color, color, border;
|
||||||
|
-webkit-appearance: none;
|
||||||
|
-moz-appearance: none;
|
||||||
|
appearance: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
input[disabled] {
|
||||||
|
opacity: .5;
|
||||||
|
cursor: not-allowed;
|
||||||
|
}
|
||||||
|
|
||||||
|
input[readonly] {
|
||||||
|
background-color: $color-muted;
|
||||||
|
}
|
||||||
|
|
||||||
|
select {
|
||||||
|
padding-right: 2rem;
|
||||||
|
border-radius: $border-radius;
|
||||||
|
background-image: url("data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg width='41px' height='26px' viewBox='0 0 41 26' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cdefs%3E%3C/defs%3E%3Cg id='Page-1' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'%3E%3Cpolygon id='Path-3' fill='%23000000' points='0 5.38215461 19.9830489 25.3652035 40.1398855 5.20836689 34.9315186 0 19.8691842 15.0623344 4.83971338 0.0328636246'%3E%3C/polygon%3E%3C/g%3E%3C/svg%3E%0A");
|
||||||
|
background-position: right .5rem center;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-size: 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
textarea {
|
textarea {
|
||||||
min-height: 5em;
|
min-height: 5em;
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
font-family: inherit;
|
|
||||||
font-size: inherit;
|
|
||||||
resize: vertical;
|
resize: vertical;
|
||||||
}
|
}
|
||||||
|
|
||||||
select {
|
|
||||||
-webkit-appearance: menulist-button;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* if select styling bugs on WebKit */
|
|
||||||
/* select { -webkit-appearance: none; } */
|
|
||||||
|
|
||||||
/* 'x' appears on right of search input when text is entered. This removes it */
|
/* 'x' appears on right of search input when text is entered. This removes it */
|
||||||
input[type="search"] {
|
input[type="search"] {
|
||||||
&::-webkit-search-decoration,
|
&::-webkit-search-decoration,
|
||||||
|
@ -69,3 +95,8 @@ input:-moz-placeholder,
|
||||||
textarea:-moz-placeholder {
|
textarea:-moz-placeholder {
|
||||||
color: #777;
|
color: #777;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
progress {
|
||||||
|
width: 100%;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue