2 * The default style sheet used to render HTML.
4 * Copyright (C) 2000 Lars Knoll (knoll@kde.org)
5 * Copyright (C) 2003-2011, 2014 Apple Inc. All rights reserved.
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Library General Public License for more details.
17 * You should have received a copy of the GNU Library General Public License
18 * along with this library; see the file COPYING.LIB. If not, write to
19 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20 * Boston, MA 02110-1301, USA.
24 @namespace "http://www.w3.org/1999/xhtml";
30 /* children of the <head> element all have display:none */
55 /* generic block-level elements */
64 -webkit-margin-before: 1__qem;
65 -webkit-margin-after: 1__qem;
66 -webkit-margin-start: 0;
67 -webkit-margin-end: 0;
78 article, aside, footer, header, hgroup, main, nav, section {
83 display: inline-block;
84 overflow: -webkit-marquee
93 -webkit-margin-before: 1__qem;
94 -webkit-margin-after: 1em;
95 -webkit-margin-start: 40px;
96 -webkit-margin-end: 40px;
105 -webkit-margin-before: 1em;
106 -webkit-margin-after: 1em;
107 -webkit-margin-start: 40px;
108 -webkit-margin-end: 40px;
120 content: close-quote;
125 /* special centering to be able to emulate the html4/netscape behaviour */
126 text-align: -webkit-center
131 -webkit-margin-before: 0.5em;
132 -webkit-margin-after: 0.5em;
133 -webkit-margin-start: auto;
134 -webkit-margin-end: auto;
147 /* heading elements */
152 -webkit-margin-before: 0.67__qem;
153 -webkit-margin-after: 0.67em;
154 -webkit-margin-start: 0;
155 -webkit-margin-end: 0;
159 :-webkit-any(article,aside,nav,section) h1 {
161 -webkit-margin-before: 0.83__qem;
162 -webkit-margin-after: 0.83em;
165 :-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) h1 {
167 -webkit-margin-before: 1__qem;
168 -webkit-margin-after: 1em;
171 :-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) h1 {
173 -webkit-margin-before: 1.33__qem;
174 -webkit-margin-after: 1.33em;
177 :-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) h1 {
179 -webkit-margin-before: 1.67__qem;
180 -webkit-margin-after: 1.67em;
183 :-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) h1 {
185 -webkit-margin-before: 2.33__qem;
186 -webkit-margin-after: 2.33em;
192 -webkit-margin-before: 0.83__qem;
193 -webkit-margin-after: 0.83em;
194 -webkit-margin-start: 0;
195 -webkit-margin-end: 0;
202 -webkit-margin-before: 1__qem;
203 -webkit-margin-after: 1em;
204 -webkit-margin-start: 0;
205 -webkit-margin-end: 0;
211 -webkit-margin-before: 1.33__qem;
212 -webkit-margin-after: 1.33em;
213 -webkit-margin-start: 0;
214 -webkit-margin-end: 0;
221 -webkit-margin-before: 1.67__qem;
222 -webkit-margin-after: 1.67em;
223 -webkit-margin-start: 0;
224 -webkit-margin-end: 0;
231 -webkit-margin-before: 2.33__qem;
232 -webkit-margin-after: 2.33em;
233 -webkit-margin-start: 0;
234 -webkit-margin-end: 0;
242 border-collapse: separate;
248 display: table-header-group;
249 vertical-align: middle;
250 border-color: inherit
254 display: table-row-group;
255 vertical-align: middle;
256 border-color: inherit
260 display: table-footer-group;
261 vertical-align: middle;
262 border-color: inherit
265 /* for tables without table section elements (can happen with XHTML or dynamically created tables) */
267 vertical-align: middle;
271 display: table-column
275 display: table-column-group
280 vertical-align: inherit;
281 border-color: inherit
286 vertical-align: inherit
294 display: table-caption;
295 text-align: -webkit-center
302 list-style-type: disc;
303 -webkit-margin-before: 1__qem;
304 -webkit-margin-after: 1em;
305 -webkit-margin-start: 0;
306 -webkit-margin-end: 0;
307 -webkit-padding-start: 40px
312 list-style-type: decimal;
313 -webkit-margin-before: 1__qem;
314 -webkit-margin-after: 1em;
315 -webkit-margin-start: 0;
316 -webkit-margin-end: 0;
317 -webkit-padding-start: 40px
322 text-align: -webkit-match-parent;
326 list-style-type: circle
329 ol ol ul, ol ul ul, ul ol ul, ul ul ul {
330 list-style-type: square
335 -webkit-margin-start: 40px
340 -webkit-margin-before: 1__qem;
341 -webkit-margin-after: 1em;
342 -webkit-margin-start: 0;
343 -webkit-margin-end: 0;
350 ol ul, ul ol, ul ul, ol ol {
351 -webkit-margin-before: 0;
352 -webkit-margin-after: 0
368 -webkit-padding-start: 2px;
369 -webkit-padding-end: 2px;
375 -webkit-margin-start: 2px;
376 -webkit-margin-end: 2px;
377 -webkit-padding-before: 0.35em;
378 -webkit-padding-start: 0.75em;
379 -webkit-padding-end: 0.75em;
380 -webkit-padding-after: 0.625em;
381 border: 2px groove ThreeDFace;
382 min-width: -webkit-min-content;
386 -webkit-appearance: button;
389 /* Form controls don't go vertical. */
390 input, textarea, keygen, select, button, isindex, meter, progress {
391 -webkit-writing-mode: horizontal-tb !important;
394 input, textarea, keygen, select, button, isindex {
396 #if !(defined(WTF_PLATFORM_IOS) && WTF_PLATFORM_IOS)
397 font: -webkit-small-control;
400 letter-spacing: normal;
401 word-spacing: normal;
403 text-transform: none;
406 display: inline-block;
410 input[type="hidden"] {
415 input[type="password"],
416 input[type="search"],
417 #if defined(WTF_PLATFORM_IOS) && WTF_PLATFORM_IOS
422 -webkit-appearance: textfield;
423 background-color: white;
424 #if defined(WTF_PLATFORM_IOS) && WTF_PLATFORM_IOS
426 font: 11px Helvetica, -webkit-pictograph;
427 border: 1px solid #4c4c4c;
428 padding: 0.2em 0.5em 0.3em 0.5em;
433 -webkit-rtl-ordering: logical;
434 -webkit-user-select: text;
438 input[type="search"] {
439 -webkit-appearance: searchfield;
440 box-sizing: border-box;
443 input::-webkit-textfield-decoration-container {
444 display: -webkit-flex;
445 -webkit-align-items: center;
446 content: none !important;
449 input[type="search"]::-webkit-textfield-decoration-container {
453 input::-webkit-clear-button {
454 -webkit-appearance: searchfield-cancel-button;
455 display: inline-block;
460 input[type="search"]::-webkit-search-cancel-button {
461 -webkit-appearance: searchfield-cancel-button;
464 -webkit-align-self: flex-start;
468 input[type="search"]::-webkit-search-decoration {
469 -webkit-appearance: searchfield-decoration;
472 -webkit-align-self: flex-start;
476 input[type="search"]::-webkit-search-results-decoration {
477 -webkit-appearance: searchfield-results-decoration;
480 -webkit-align-self: flex-start;
484 input[type="search"]::-webkit-search-results-button {
485 -webkit-appearance: searchfield-results-button;
490 #if defined(ENABLE_DATALIST_ELEMENT) && ENABLE_DATALIST_ELEMENT
496 #if defined(ENABLE_INPUT_TYPE_DATE) && ENABLE_INPUT_TYPE_DATE
498 -webkit-align-items: center;
499 -webkit-appearance: menulist-button;
500 display: -webkit-inline-flex;
502 #if !(defined(WTF_PLATFORM_IOS) && WTF_PLATFORM_IOS)
507 #if defined(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) && ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE
508 input[type="datetime"] {
509 -webkit-align-items: center;
510 -webkit-appearance: menulist-button;
511 display: -webkit-inline-flex;
513 #if !(defined(WTF_PLATFORM_IOS) && WTF_PLATFORM_IOS)
518 #if defined(ENABLE_INPUT_TYPE_DATETIMELOCAL) && ENABLE_INPUT_TYPE_DATETIMELOCAL
519 input[type="datetime-local"] {
520 -webkit-align-items: center;
521 -webkit-appearance: menulist-button;
522 display: -webkit-inline-flex;
524 #if !(defined(WTF_PLATFORM_IOS) && WTF_PLATFORM_IOS)
529 #if defined(ENABLE_INPUT_TYPE_MONTH) && ENABLE_INPUT_TYPE_MONTH
530 input[type="month"] {
531 -webkit-align-items: center;
532 -webkit-appearance: menulist-button;
533 display: -webkit-inline-flex;
535 #if !(defined(WTF_PLATFORM_IOS) && WTF_PLATFORM_IOS)
540 #if defined(ENABLE_INPUT_TYPE_TIME) && ENABLE_INPUT_TYPE_TIME
542 -webkit-align-items: center;
543 -webkit-appearance: menulist-button;
544 display: -webkit-inline-flex;
546 #if !(defined(WTF_PLATFORM_IOS) && WTF_PLATFORM_IOS)
551 #if defined(ENABLE_INPUT_TYPE_WEEK) && ENABLE_INPUT_TYPE_WEEK
552 #if !(defined(WTF_PLATFORM_IOS) && WTF_PLATFORM_IOS)
554 -webkit-align-items: center;
555 -webkit-appearance: menulist-button;
556 display: -webkit-inline-flex;
563 #if !(defined(WTF_PLATFORM_IOS) && WTF_PLATFORM_IOS)
564 input::-webkit-date-and-time-value {
565 margin: 1px 24px 1px 4px;
570 input::-webkit-inner-spin-button {
571 -webkit-appearance: inner-spin-button;
575 /* This height property is ignored for input type "number" and others which
576 * use RenderTextControlSingleLine as renderer which sets height of spin
577 * button in layout(). */
581 -webkit-user-select: none;
588 keygen::-webkit-keygen-select {
593 -webkit-appearance: textarea;
594 #if !(defined(WTF_PLATFORM_IOS) && WTF_PLATFORM_IOS)
595 background-color: white;
597 -webkit-rtl-ordering: logical;
598 -webkit-user-select: text;
600 -webkit-nbsp-mode: space;
601 -webkit-line-break: after-white-space;
603 -webkit-flex-direction: column;
607 white-space: pre-wrap;
608 word-wrap: break-word;
611 ::-webkit-input-placeholder {
612 -webkit-text-security: none;
614 pointer-events: none !important;
617 input::-webkit-input-placeholder, isindex::-webkit-input-placeholder {
623 input[type="password"] {
624 -webkit-text-security: disc !important;
627 input[type="hidden"], input[type="image"], input[type="file"] {
628 -webkit-appearance: initial;
630 background-color: initial;
635 -webkit-align-items: baseline;
637 text-align: start !important;
640 input:-webkit-autofill {
641 #if defined(WTF_PLATFORM_IOS) && WTF_PLATFORM_IOS
642 background-color: #F7EC87 !important;
644 background-color: #FAFFBD !important;
646 background-image:none !important;
647 color: #000000 !important;
650 input[type="radio"], input[type="checkbox"] {
652 #if defined(WTF_PLATFORM_IOS) && WTF_PLATFORM_IOS
653 border: 1px solid #4c4c4c;
654 box-sizing: border-box;
657 background-color: initial;
662 input[type="button"], input[type="submit"], input[type="reset"] {
663 -webkit-appearance: push-button;
667 input[type="file"]::-webkit-file-upload-button {
668 -webkit-appearance: push-button;
674 input[type="button"], input[type="submit"], input[type="reset"], input[type="file"]::-webkit-file-upload-button, button {
675 -webkit-align-items: flex-start;
679 #if !(defined(WTF_PLATFORM_IOS) && WTF_PLATFORM_IOS)
680 padding: 2px 6px 3px 6px;
681 border: 2px outset ButtonFace;
682 background-color: ButtonFace;
685 border: 1px solid #4c4c4c;
686 /* We want to be as close to background-color:transparent as possible without actually being transparent. */
687 background-color: rgba(255, 255, 255, 0.01);
688 font: 11px Helvetica;
690 box-sizing: border-box
693 input[type="range"] {
694 -webkit-appearance: slider-horizontal;
701 input[type="range"]::-webkit-slider-container, input[type="range"]::-webkit-media-slider-container {
703 box-sizing: border-box;
704 display: -webkit-flex;
705 -webkit-align-contents: center;
708 input[type="range"]::-webkit-slider-runnable-track {
710 -webkit-align-self: center;
712 box-sizing: border-box;
716 input[type="range"]::-webkit-slider-thumb, input[type="range"]::-webkit-media-slider-thumb {
717 -webkit-appearance: sliderthumb-horizontal;
718 box-sizing: border-box;
720 #if defined(WTF_PLATFORM_IOS) && WTF_PLATFORM_IOS
721 background-color: white;
722 border: 1px solid rgb(66, 66, 66);
727 #if defined(WTF_PLATFORM_IOS) && WTF_PLATFORM_IOS
728 input[type="range"]::-webkit-slider-thumb:active {
729 background-color: black;
732 input:disabled, textarea:disabled {
736 input[readonly], textarea[readonly] {
737 border-color: rgb(188, 188, 188);
740 textarea::-webkit-input-placeholder {
745 input[type="button"]:disabled, input[type="submit"]:disabled, input[type="reset"]:disabled,
746 input[type="file"]:disabled::-webkit-file-upload-button, button:disabled,
747 select:disabled, keygen:disabled, optgroup:disabled, option:disabled,
748 select[disabled]>option {
752 #if !(defined(WTF_PLATFORM_IOS) && WTF_PLATFORM_IOS)
753 input[type="button"]:active, input[type="submit"]:active, input[type="reset"]:active, input[type="file"]:active::-webkit-file-upload-button, button:active {
757 input[type="button"]:active:disabled, input[type="submit"]:active:disabled, input[type="reset"]:active:disabled, input[type="file"]:active:disabled::-webkit-file-upload-button, button:active:disabled {
766 input[type="checkbox"] {
767 -webkit-appearance: checkbox;
768 #if !(defined(WTF_PLATFORM_IOS) && WTF_PLATFORM_IOS)
769 box-sizing: border-box;
775 /* We want to be as close to background:transparent as possible without actually being transparent */
776 background-color: rgba(255, 255, 255, 0.01);
780 #if defined(WTF_PLATFORM_IOS) && WTF_PLATFORM_IOS
781 input[type="radio"] {
782 -webkit-appearance: radio;
787 /* We want to be as close to background:transparent as possible without actually being transparent */
788 background-color: rgba(255, 255, 255, 0.01);
791 input[type="checkbox"]:checked, input[type="radio"]:checked {
792 background:rgba(0, 0, 0, 0.8);
793 border-color:rgba(255, 255, 255, 0.0);
796 input[type="checkbox"]:checked:disabled, input[type="radio"]:checked:disabled {
798 background:rgba(0, 0, 0, 0.8);
802 #if !(defined(WTF_PLATFORM_IOS) && WTF_PLATFORM_IOS)
803 input[type="radio"] {
804 -webkit-appearance: radio;
805 box-sizing: border-box;
809 #if defined(WTF_PLATFORM_IOS) && WTF_PLATFORM_IOS
811 border-color: rgb(17, 46, 135);
815 #if defined(ENABLE_INPUT_TYPE_COLOR) && ENABLE_INPUT_TYPE_COLOR
817 input[type="color"] {
818 -webkit-appearance: square-button;
823 input[type="color"]::-webkit-color-swatch-wrapper {
824 display:-webkit-flex;
826 box-sizing: border-box;
831 input[type="color"]::-webkit-color-swatch {
832 background-color: #000000;
833 border: 1px solid #777777;
837 #if defined(ENABLE_DATALIST_ELEMENT) && ENABLE_DATALIST_ELEMENT
839 input[type="color"][list] {
840 -webkit-appearance: menulist;
845 input[type="color"][list]::-webkit-color-swatch-wrapper {
850 input[type="color"][list]::-webkit-color-swatch {
851 border-color: #000000;
854 #endif // defined(ENABLE_DATALIST_ELEMENT) && ENABLE_DATALIST_ELEMENT
856 #endif // defined(ENABLE_INPUT_TYPE_COLOR) && ENABLE_INPUT_TYPE_COLOR
859 box-sizing: border-box;
860 #if defined(WTF_PLATFORM_IOS) && WTF_PLATFORM_IOS
861 -webkit-appearance: menulist-button;
862 letter-spacing: normal;
863 word-spacing: normal;
865 border: 1px solid #4c4c4c;
866 /* We want to be as close to background:transparent as possible without actually being transparent */
867 background-color: rgba(255, 255, 255, 0.01);
868 font: 11px Helvetica;
869 padding: 0 0.4em 0 0.4em;
871 -webkit-appearance: menulist;
874 background-color: white;
876 -webkit-align-items: center;
878 -webkit-rtl-ordering: logical;
882 #if !(defined(WTF_PLATFORM_IOS) && WTF_PLATFORM_IOS)
885 select[size][multiple] {
886 -webkit-appearance: listbox;
887 -webkit-align-items: flex-start;
888 border: 1px inset gray;
889 border-radius: initial;
890 white-space: initial;
895 -webkit-appearance: menulist;
896 -webkit-align-items: center;
915 /* form validation message bubble */
917 ::-webkit-validation-bubble {
918 display: inline-block;
924 -webkit-text-security: none;
925 -webkit-transition: opacity 05.5s ease;
928 ::-webkit-validation-bubble-message {
929 display: -webkit-flex;
936 border: solid 2px #400;
937 background: -webkit-gradient(linear, left top, left bottom, from(#f8ecec), to(#e8cccc));
940 -webkit-box-shadow: 4px 4px 4px rgba(100,100,100,0.6),
941 inset -2px -2px 1px #d0c4c4,
942 inset 2px 2px 1px white;
948 ::-webkit-validation-bubble-text-block {
952 ::-webkit-validation-bubble-heading {
956 ::-webkit-validation-bubble-arrow {
957 display: inline-block;
962 background-color: #f8ecec;
963 border-width: 2px 0 0 2px;
966 box-shadow: inset 2px 2px 1px white;
967 -webkit-transform-origin: 0 0;
968 -webkit-transform: rotate(45deg);
972 ::-webkit-validation-bubble-arrow-clipper {
978 #if defined(ENABLE_METER_ELEMENT) && ENABLE_METER_ELEMENT
982 -webkit-appearance: meter;
983 box-sizing: border-box;
984 display: inline-block;
987 vertical-align: -0.2em;
990 meter::-webkit-meter-inner-element {
991 -webkit-appearance: inherit;
997 meter::-webkit-meter-bar {
998 background: -webkit-gradient(linear, left top, left bottom, from(#ddd), to(#ddd), color-stop(0.20, #eee), color-stop(0.45, #ccc), color-stop(0.55, #ccc));
1001 box-sizing: border-box;
1004 meter::-webkit-meter-optimum-value {
1005 background: -webkit-gradient(linear, left top, left bottom, from(#ad7), to(#ad7), color-stop(0.20, #cea), color-stop(0.45, #7a3), color-stop(0.55, #7a3));
1007 box-sizing: border-box;
1010 meter::-webkit-meter-suboptimum-value {
1011 background: -webkit-gradient(linear, left top, left bottom, from(#fe7), to(#fe7), color-stop(0.20, #ffc), color-stop(0.45, #db3), color-stop(0.55, #db3));
1013 box-sizing: border-box;
1016 meter::-webkit-meter-even-less-good-value {
1017 background: -webkit-gradient(linear, left top, left bottom, from(#f77), to(#f77), color-stop(0.20, #fcc), color-stop(0.45, #d44), color-stop(0.55, #d44));
1019 box-sizing: border-box;
1026 -webkit-appearance: progress-bar;
1027 box-sizing: border-box;
1028 display: inline-block;
1031 vertical-align: -0.2em;
1034 progress::-webkit-progress-inner-element {
1035 -webkit-appearance: inherit;
1036 box-sizing: inherit;
1041 progress::-webkit-progress-bar {
1042 background-color: gray;
1045 box-sizing: border-box;
1048 progress::-webkit-progress-value {
1049 background-color: green;
1051 width: 50%; /* should be removed later */
1052 box-sizing: border-box;
1055 /* inline elements */
1058 text-decoration: underline
1065 i, cite, em, var, address, dfn {
1069 tt, code, kbd, samp {
1070 font-family: monospace
1073 pre, xmp, plaintext, listing {
1075 font-family: monospace;
1081 background-color: yellow;
1094 text-decoration: line-through
1098 vertical-align: sub;
1103 vertical-align: super;
1114 outline: auto 5px -webkit-focus-ring-color
1117 /* Read-only text fields do not show a focus ring but do still receive focus */
1118 html:focus, body:focus, input[readonly]:focus {
1122 applet:focus, embed:focus, iframe:focus, object:focus {
1126 input:focus, textarea:focus, isindex:focus, keygen:focus, select:focus {
1127 outline-offset: -2px
1130 input[type="button"]:focus,
1131 input[type="checkbox"]:focus,
1132 input[type="file"]:focus,
1133 input[type="hidden"]:focus,
1134 input[type="image"]:focus,
1135 input[type="radio"]:focus,
1136 input[type="reset"]:focus,
1137 input[type="search"]:focus,
1138 input[type="submit"]:focus,
1139 input[type="file"]:focus::-webkit-file-upload-button {
1143 a:-webkit-any-link {
1144 color: -webkit-link;
1145 text-decoration: underline;
1149 a:-webkit-any-link:active {
1150 color: -webkit-activelink
1153 /* HTML5 ruby elements */
1156 text-indent: 0; /* blocks used for ruby rendering should not trigger this */
1160 line-height: normal;
1161 -webkit-text-emphasis: none;
1166 font-size: -webkit-ruby-text;
1174 /* other elements */
1185 border-color: inherit
1200 summary::-webkit-details-marker {
1201 display: inline-block;
1204 margin-right: 0.4em;
1207 #if defined(ENABLE_TEMPLATE_ELEMENT) && ENABLE_TEMPLATE_ELEMENT
1214 unicode-bidi: -webkit-isolate;
1218 unicode-bidi: bidi-override;
1221 #if defined(WTF_PLATFORM_IOS) && WTF_PLATFORM_IOS
1222 applet, embed, object, img {
1223 -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
1225 :-webkit-any-link img {
1226 -webkit-tap-highlight-color: inherit;
1233 /* FIXME: Define the right default values for page properties. */
1240 /* noscript is handled internally, as it depends on settings. */