swingset
Version:
drop-in component library and documentation pages for next.js
128 lines (109 loc) • 2.8 kB
CSS
.knobs {
border: 1px solid #bbb;
border-radius: 3px;
padding: 20px;
margin-bottom: 30px;
position: relative;
}
.field {
margin: 12px 0;
}
.field.contained {
display: flex;
align-items: center;
}
.field .requiredStar {
color: #b20b0b;
}
.field label {
margin-right: 12px;
font-family: monospace;
font-size: 15px;
}
.field:global(.indent-1) {
margin-left: 30px;
}
.checkbox {
appearance: none;
background: linear-gradient(to bottom, #ffffff 0%, #eee 100%);
border: 1px solid #ccc;
border-radius: 4px;
width: 17px;
height: 17px;
cursor: pointer;
transition: border-color 0.2s ease;
}
.checkbox:hover {
border-color: #aaa;
}
.checkbox:checked {
background: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath fill='%23fff' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26 2.974 7.25 8 2.193z'/%3E%3C/svg%3E")
center center no-repeat,
linear-gradient(to bottom, #d4ecee 0%, #9bced3 100%);
border-color: #9ccace;
background-size: 60% 60%, 100%, 100%;
}
.select {
display: block;
font-size: 12px;
font-family: sans-serif;
font-weight: 700;
color: #444;
line-height: 1.3;
padding: 0.5em 1.4em 0.4em 0.7em;
box-sizing: border-box;
margin: 0;
border: 1px solid #c5c5c5;
border-radius: 0.3em;
appearance: none;
background-color: #fff;
background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%444444%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E'),
linear-gradient(to bottom, #ffffff 0%, #eee 100%);
background-repeat: no-repeat, repeat;
background-position: right 0.7em top 50%, 0 0;
background-size: 0.65em auto, 100%;
cursor: pointer;
}
.select::-ms-expand {
display: none;
}
.select:hover {
border-color: #aaa;
}
.select:focus {
border-color: #aaa;
/* box-shadow: 0 0 1px 1px rgba(59, 153, 252, 0.7);
box-shadow: 0 0 0 1px -moz-mac-focusring; */
color: #222;
outline: none;
}
.select option {
font-weight: normal;
}
.input,
.textarea {
border: 1px solid #ccc;
border-radius: 3px;
font-weight: 700;
font-size: 12px;
padding: 6px 8px;
color: #444;
transition: border-color 0.2s ease;
}
.input:hover,
.textarea:hover {
border-color: #aaa;
}
.input:focus,
.textarea:focus {
border-color: #9bced3;
outline: 0;
}
.textarea {
width: 400px;
min-height: 100px;
}
.error {
border: 1px solid #b20b0b;
color: #b20b0b;
}