static: merge form styling from publik-base-theme (#11153)

This commit is contained in:
Frédéric Péters 2016-05-28 14:40:57 +02:00
parent 32e40afe65
commit e59d4e77ee
3 changed files with 315 additions and 237 deletions

View File

@ -0,0 +1,311 @@
label {
margin-bottom: 0;
}
form div.widget {
margin-bottom: 2ex;
}
div.error {
color: black;
font-weight: bold;
background: transparent url(../dialog-warning.png) top left no-repeat;
padding-left: 22px;
margin-left: 5px;
}
span.required {
margin-left: 0.7ex;
position: relative;
top: -0.2ex;
}
div.widget div.title {
margin-bottom: 0;
}
div.buttons {
margin-top: 2em;
}
div.buttons div {
display: inline-block;
& input[name="submit"] {
font-weight: bold;
}
}
a.button {
padding-bottom: calc(1ex + 1px);
line-height: 2.5em;
}
a.button,
.fargo-pick-popup button,
div#content button,
input[type=submit],
.ui-dialog .ui-dialog-buttonpane button,
div.buttons input {
background-image: linear-gradient(to bottom, #f9f9f9, #eeeeee);
color: #3c3c33;
padding: 5px 15px;
cursor: pointer;
border: 1px solid #aaa;
transition: all 0.2s ease;
margin-right: 2ex;
height: 2.5em;
vertical-align: middle;
box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.21);
&:hover {
box-shadow: 0px 0px 5px #888;
}
}
div#content button:disabled,
input[type=submit]:disabled {
pointer-events: none;
box-shadow: none;
cursor: not-allowed;
}
button::-moz-focus-inner {
border: 0;
padding: 1px 0 -1px 0;
margin: -3px 0 1px 0;
}
input, input[type="text"], input[type="url"], input[type="email"], input[type="password"], input[type="url"], input[type="tel"], input[type="number"], input[type="search"], input[type="file"], input[type="date"], input[type="datetime-local"], input[type="month"], input[type="time"], input[type="week"], textarea, select {
border: 1px solid #AAA;
border-radius: 0px;
box-sizing: border-box;
margin: 0.2em 0px;
outline: medium none;
padding: 0.7ex 0.7em;
max-width: 100%;
&:focus {
box-shadow: 0 0 0px 1px #1999cd;
}
&.disabled,
&[disabled] {
background: #eee;
}
}
input[type="radio"]:focus, input[tye="checkbox"]:focus {
box-shadow: none;
}
input[readonly], select[readonly], textarea[readonly] {
border-width: 0 0 1px 0;
}
input[type=file] {
border: none;
padding-left: 0;
}
select {
background: white;
@include vendor-prefix('appearance', 'none');
padding-right: 4em;
background-image: url(arrow-down.svg);
background-position: right 1.3rem center;
background-repeat: no-repeat;
background-size: 1rem auto;
}
select[multiple=multiple] {
background: white;
padding-right: 0;
}
input[type="checkbox"],
input[type="radio"] {
margin-right: 1ex;
margin-bottom: 1ex;
}
div.content label {
margin-right: 1em;
}
div.widget div.content ul {
padding: 0;
margin: 0;
list-style: none;
}
span.helptext,
div.hint {
display: block;
font-size: 80%;
}
form p label {
display: block;
}
div.a2-block form input,
div.a2-block form select {
width: 100%;
}
div.a2-block form input[type=radio] {
width: auto;
}
div.a2-block form input[type=submit] {
width: auto;
min-width: 20ex;
}
div.a2-block ul#id_edit-profile-title {
margin-left: 1em;
margin-top: -1ex;
li {
display: inline-block;
margin-right: 2em;
}
label {
font-weight: normal;
}
}
form ul.errorlist {
padding: 0;
margin: 2em 0 0 0;
list-style: none;
& li::before {
content: "\f06a";
font-family: FontAwesome;
padding-right: 1ex;
}
}
body .ui-front {
z-index: 1000;
}
/* dialog styling */
div.ui-widget-overlay {
background: #333;
}
div.ui-dialog {
border: 0;
box-shadow: rgb(102, 102, 102) 0px 0px 20px 2px;
padding: 0;
border-radius: 0;
max-width: 80%;
min-width: 30%;
.ui-dialog-titlebar {
background: #eee;
border-radius: 0;
border: none;
.ui-dialog-title {
font-size: 130%;
font-weight: normal;
}
button {
border: transparent;
background: transparent;
box-shadow: none;
}
}
.ui-widget-content {
.ui-state-default.ui-button {
border-radius: 0;
}
}
form p input,
form p select,
form p textarea {
width: 95%;
}
form p input[type=checkbox] {
width: auto;
}
}
/* fieldsets */
fieldset.gadjo-foldable legend.gadjo-foldable-widget {
border-bottom: 1px solid #aaa;
cursor: pointer;
display: block;
font-weight: bold;
padding: 1ex 0 0;
width: 100%;
}
fieldset.gadjo-foldable legend.gadjo-foldable-widget:after {
font-family: FontAwesome;
content: "\f106"; /* angle-up */
position: absolute;
right: 1em;
}
fieldset.gadjo-foldable.gadjo-folded legend.gadjo-foldable-widget:after {
content: "\f107"; /* angle-down */
}
fieldset.gadjo-foldable {
padding: 1ex 0 0 0;
border: 0;
}
.gadjo-foldable.gadjo-folded > .gadjo-folding {
display: none;
}
/* form.as_p */
form p {
margin: 0 0 1em 0;
}
form p label {
display: block;
}
form p.required label:after {
padding-left: 1ex;
content: "*";
color: red;
}
form p label {
margin-bottom: 0.3ex;
}
/* form.small */
form.small p input {
margin-left: 0;
}
form.small p {
margin-bottom: 0.5em;
}
form.small label {
width: 200px;
display: inline-block;
}
form.small a.button,
form.small button {
margin-left: 205px;
display: inline-block;
}
form.small button + button,
form.small button + a.button {
margin-left: 1em;
}

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 444.8 444.8"><path d="M248.1 352L434 165.9c7.2-6.9 10.8-15.4 10.8-25.7 0-10.3-3.6-18.8-10.8-25.7l-21.4-21.7c-7-7-15.6-10.6-25.7-10.6-9.9 0-18.6 3.5-26 10.6L222.4 231.5 83.7 92.8c-7-7-15.6-10.6-25.7-10.6-9.9 0-18.6 3.5-26 10.6l-21.4 21.7c-7 7-10.6 15.6-10.6 25.7s3.5 18.7 10.6 25.7L196.4 352c7.4 7 16.1 10.6 26 10.6 10.1 0 18.7-3.5 25.7-10.6z"/></svg>

After

Width:  |  Height:  |  Size: 403 B

View File

@ -1,12 +1,6 @@
/* generalities */
@import 'utils';
@font-face {
font-family: 'FontAwesome';
src: url('../xstatic/fonts/fontawesome-webfont.eot?v=4.1.0');
src: url('../xstatic/fonts/fontawesome-webfont.eot?#iefix&v=4.1.0') format('embedded-opentype'), url('../xstatic/fonts/fontawesome-webfont.woff?v=4.1.0') format('woff'), url('../xstatic/fonts/fontawesome-webfont.ttf?v=4.1.0') format('truetype'), url('../xstatic/fonts/fontawesome-webfont.svg?v=4.1.0#fontawesomeregular') format('svg');
font-weight: normal;
font-style: normal;
}
/* generalities */
html, body {
margin: 0;
@ -470,58 +464,6 @@ ul.objects-list.single-links li a {
/* widgets & dialogs */
textarea:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
textarea,
input[type="text"],
input[type="email"],
input[type="password"] {
border: 1px solid #bbb;
padding: 7px 10px;
background: white;
color: black;
box-shadow: inset 0 1px 3px #ddd;
}
textarea:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus {
box-shadow: 0 0 0px 1px #1999cd;
}
textarea:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus {
box-shadow: 0 0 0px 1px #1999cd;
}
button::-moz-focus-inner {
border: 0;
padding: 1px 0 -1px 0;
margin: -3px 0 1px 0;
}
a.button, button, input[type=submit] {
line-height: 100%;
cursor: pointer;
border: 1px solid #b7b7b7;
border-radius: 1px;
color: #424258;
padding: 1ex 2ex;
text-decoration: none;
background: #aaaaaa;
background-image: linear-gradient(to bottom, #f9f9f9, #eeeeee);
box-shadow: 0 2px 2px 0px #ddd;
}
a.button {
padding-bottom: calc(1ex + 1px);
}
input[type="submit"][name="submit"] {
background: #283c54;
background-image: linear-gradient(to bottom, #1cabe7, #1999cd);
@ -533,158 +475,6 @@ input[type=submit]:hover {
border-color: #666;
}
/* disabled items */
textarea.disabled:focus,
input.disabled[type="text"]:focus,
input.disabled[type="email"]:focus,
input.disabled[type="password"]:focus,
textarea.disabled,
input.disabled[type="text"],
input.disabled[type="email"],
input.disabled[type="password"],
textarea.disabled:focus,
input.disabled[type="text"]:focus,
input.disabled[type="email"]:focus,
input.disabled[type="password"]:focus,
a.button.disabled, button.disabled, button[disabled] {
border: 1px solid #bbb;
background: #f9f9f9;
cursor: default;
box-shadow: none;
color: #888;
}
a.disabled {
color: #888;
text-decoration: none;
border: none;
cursor: default;
}
/* dialog styling */
.ui-dialog .ui-widget-content .ui-state-default.ui-button {
border-radius: 1px;
background: #e6e6e6;
box-shadow: 0px 0px 2px 0px #DDD;
}
.ui-dialog .ui-widget-content .ui-state-default:hover {
border-color: #ccc;
box-shadow: 0px 0px 2px 0px #bbb;
}
.ui-dialog .ui-widget-content .ui-state-default.delete-button {
background: #bc4c38;
background-image: linear-gradient(to bottom, #dc2c18, #a43c28);
color: white;
font-weight: bold;
}
.ui-dialog .ui-widget-content .ui-state-default.delete-button:hover {
border-color: #a43c28;
}
.ui-dialog .ui-widget-content .ui-state-default.submit-button {
background: #283c54;
background-image: linear-gradient(to bottom, #1cabe7, #1999cd);
color: white;
font-weight: bold;
}
.ui-dialog .ui-widget-content .ui-state-default.submit-button:hover {
border-color: #283c94;
}
div.ui-widget-overlay {
background: #333;
}
div.ui-dialog {
border: 0;
box-shadow: rgb(102, 102, 102) 0px 0px 20px 2px;
padding: 0;
border-radius: 0;
max-width: 80%;
min-width: 30%;
}
div.ui-dialog .ui-dialog-titlebar {
background: #eee;
border-radius: 0;
border: none;
}
div.ui-dialog .ui-dialog-titlebar .ui-dialog-title {
font-size: 130%;
font-weight: normal;
}
div.ui-dialog .ui-dialog-titlebar button {
border: transparent;
background: transparent;
box-shadow: none;
}
div.ui-dialog form p input,
div.ui-dialog form p select,
div.ui-dialog form p textarea {
width: 95%;
}
div.ui-dialog form p input[type=checkbox] {
width: auto;
}
form p {
margin: 0 0 1em 0;
}
form p label {
display: block;
}
form p.required label:after {
padding-left: 1ex;
content: "*";
color: red;
}
form p label {
margin-bottom: 0.5ex;
}
ul.errorlist {
margin: 0;
padding: 0;
color: #e80404;
list-style: none;
}
form.small p input {
margin-left: 0;
}
form.small p {
margin-bottom: 0.5em;
}
form.small label {
width: 200px;
display: inline-block;
}
form.small a.button,
form.small button {
margin-left: 205px;
display: inline-block;
}
form.small button + button,
form.small button + a.button {
margin-left: 1em;
}
#sidepage {
position: absolute;
z-index: 100;
@ -818,31 +608,6 @@ div.old-ie-warning p {
margin: 0;
line-height: 150%;
}
/* fieldsets */
fieldset.gadjo-foldable legend.gadjo-foldable-widget {
border-bottom: 1px solid #aaa;
cursor: pointer;
display: block;
font-weight: bold;
padding: 1ex 0 0;
width: 100%;
}
fieldset.gadjo-foldable legend.gadjo-foldable-widget:after {
font-family: FontAwesome;
content: "\f106"; /* angle-up */
position: absolute;
right: 1em;
}
fieldset.gadjo-foldable.gadjo-folded legend.gadjo-foldable-widget:after {
content: "\f107"; /* angle-down */
}
fieldset.gadjo-foldable {
padding: 1ex 0 0 0;
border: 0;
}
.gadjo-foldable.gadjo-folded > .gadjo-folding {
display: none;
}
ul#sidepage-menu li a.icon-add { background-image: url(icons/add.small.png); }
ul#sidepage-menu li a.icon-book { background-image: url(icons/book.small.png); }
@ -949,3 +714,4 @@ ul.apps li.icon-announces a:hover { background-image: url(icons/announces.large-
}
@import 'grid';
@import 'forms';