Files
react/fixtures/dom/src/style.css
T
Brandon Dail 80411ea9b4 Default to first non-disabled option for select elements (#10456)
* Default to first non-disabled option for select

Instead of defaulting to the first option for a select element, which could be a disabled option, we find the first non-disabled option available while we looping through the options. If no option matches, set the first non-disabled option as selected.

* Add ReactDOMSelect test for defaulting to non-disabled options

* Add test fixtures to cover disabled selected options

* Fix bad merge
2017-09-01 13:34:28 -07:00

221 lines
3.2 KiB
CSS

*,
*:before,
*:after {
box-sizing: border-box;
}
html {
font-size: 10px;
}
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen",
"Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue",
sans-serif;
font-size: 1.4rem;
margin: 0;
padding: 0;
}
button {
margin: 10px;
font-size: 18px;
padding: 5px;
}
.header {
background: #222;
box-shadow: inset 0 -1px 3px #000;
font-size: 1.6rem;
line-height: 3.2rem;
overflow: hidden;
padding: .8rem 1.6rem;
}
.header select {
width: 12rem;
}
.header__inner {
display: table;
margin: 0 auto;
max-width: 1000px;
overflow: hidden;
text-align: center;
width: 100%;
}
.header__logo {
color: #efefef;
display: table-cell;
vertical-align: middle;
white-space: nowrap;
}
.header__logo img {
display: inline-block;
margin-right: 0.8rem;
vertical-align: middle;
}
.header-controls {
display: table-cell;
text-align: right;
vertical-align: middle;
width: 100%;
}
.sr-only {
clip: rect(0, 0, 0, 0);
height: 0;
margin: -1px;
position: absolute;
width: 0;
}
.container {
margin: 0 auto;
max-width: 900px;
overflow: hidden;
padding: 2rem;
}
.control-label {
display: block;
font-size: 1.2rem;
letter-spacing: 0.01em;
margin-bottom: 0.4rem;
text-transform: uppercase;
}
.field {
padding: 0.8rem;
}
fieldset {
border: 1px solid #aaa;
float: left;
padding: 1.6rem;
width: 49%;
}
.control-box {
overflow: hidden;
}
ul,
ol {
margin: 0 0 2rem 0;
}
li {
margin-bottom: 0.4rem;
}
.type-subheading {
font-size: 1.8rem;
font-weight: 600;
line-height: 1.5;
margin: 0 0 1.6rem;
}
.hint {
font-style: italic;
line-height: 1.5;
}
.footnote {
border-left: 4px solid #aaa;
color: #444;
font-style: italic;
line-height: 1.5;
margin-bottom: 2.4rem;
margin-left: 0.4rem;
padding-left: 1.6rem;
}
.test-case {
border-radius: 0.2rem;
border: 1px solid #d9d9d9;
margin: 3.2rem 0 3.2rem;
}
.test-case__title {
padding: 10px 15px 8px;
line-height: 16px;
font-size: 18px;
border-bottom: 1px dashed #d9d9d9;
margin: 0 0 -1px;
}
.test-case__title__check {
display: inline-block;
margin-right: 8px;
vertical-align: middle;
}
.test-case__body {
padding: 0 15px;
}
.test-case__desc {
font-style: italic;
margin: 15px 0;
padding: 0 15px;
}
.test-case--complete {
border-color: #5cb85c;
}
.test-case--complete .test-case__title {
color: #5cb85c;
}
.test-case__details {
border-bottom: 1px dashed #d9d9d9;
font-size: 80%;
text-transform: uppercase;
letter-spacing: 0.02em;
margin: 0;
padding: 0 15px;
}
.test-case__details > * {
display: inline-block;
}
.test-case__details > dt,
.test-case__details > dd {
padding: 8px 0 6px;
}
.test-case__details > dt {
color: #464a4c;
font-weight: 600;
}
.test-case__details > dd {
margin-left: 1rem;
}
.test-case__details > dd + dt {
margin-left: 1.5rem;
}
.test-case__invalid-version {
font-style: italic;
font-size: 1.6rem;
color: #5cb85c;
}
.test-fixture {
padding: 20px;
margin: 0 -15px; /* opposite of .test-case padding */
background-color: #f4f4f4;
border-top: 1px solid #d9d9d9;
}
.field-group {
overflow: hidden;
}