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="button"]:active, input[type="submit"]:active, input[type="reset"]:active, input[type="file"]::-webkit-file-upload-button:active, button:active {
694 color: ActiveButtonText;
697 input[type="range"] {
698 -webkit-appearance: slider-horizontal;
705 input[type="range"]::-webkit-slider-container, input[type="range"]::-webkit-media-slider-container {
707 box-sizing: border-box;
708 display: -webkit-flex;
709 -webkit-align-contents: center;
712 input[type="range"]::-webkit-slider-runnable-track {
714 -webkit-align-self: center;
716 box-sizing: border-box;
720 input[type="range"]::-webkit-slider-thumb, input[type="range"]::-webkit-media-slider-thumb {
721 -webkit-appearance: sliderthumb-horizontal;
722 box-sizing: border-box;
724 #if defined(WTF_PLATFORM_IOS) && WTF_PLATFORM_IOS
725 background-color: white;
726 border: 1px solid rgb(66, 66, 66);
731 #if defined(WTF_PLATFORM_IOS) && WTF_PLATFORM_IOS
732 input[type="range"]::-webkit-slider-thumb:active {
733 background-color: black;
736 input:disabled, textarea:disabled {
740 input[readonly], textarea[readonly] {
741 border-color: rgb(188, 188, 188);
744 textarea::-webkit-input-placeholder {
749 input[type="button"]:disabled, input[type="submit"]:disabled, input[type="reset"]:disabled,
750 input[type="file"]:disabled::-webkit-file-upload-button, button:disabled,
751 select:disabled, keygen:disabled, optgroup:disabled, option:disabled,
752 select[disabled]>option {
756 #if !(defined(WTF_PLATFORM_IOS) && WTF_PLATFORM_IOS)
757 input[type="button"]:active, input[type="submit"]:active, input[type="reset"]:active, input[type="file"]:active::-webkit-file-upload-button, button:active {
761 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 {
770 input[type="checkbox"] {
771 -webkit-appearance: checkbox;
772 #if !(defined(WTF_PLATFORM_IOS) && WTF_PLATFORM_IOS)
773 box-sizing: border-box;
779 /* We want to be as close to background:transparent as possible without actually being transparent */
780 background-color: rgba(255, 255, 255, 0.01);
784 #if defined(WTF_PLATFORM_IOS) && WTF_PLATFORM_IOS
785 input[type="radio"] {
786 -webkit-appearance: radio;
791 /* We want to be as close to background:transparent as possible without actually being transparent */
792 background-color: rgba(255, 255, 255, 0.01);
795 input[type="checkbox"]:checked, input[type="radio"]:checked {
796 background:rgba(0, 0, 0, 0.8);
797 border-color:rgba(255, 255, 255, 0.0);
800 input[type="checkbox"]:checked:disabled, input[type="radio"]:checked:disabled {
802 background:rgba(0, 0, 0, 0.8);
806 #if !(defined(WTF_PLATFORM_IOS) && WTF_PLATFORM_IOS)
807 input[type="radio"] {
808 -webkit-appearance: radio;
809 box-sizing: border-box;
813 #if defined(WTF_PLATFORM_IOS) && WTF_PLATFORM_IOS
815 border-color: rgb(17, 46, 135);
819 #if defined(ENABLE_INPUT_TYPE_COLOR) && ENABLE_INPUT_TYPE_COLOR
821 input[type="color"] {
822 -webkit-appearance: square-button;
827 input[type="color"]::-webkit-color-swatch-wrapper {
828 display:-webkit-flex;
830 box-sizing: border-box;
835 input[type="color"]::-webkit-color-swatch {
836 background-color: #000000;
837 border: 1px solid #777777;
841 #if defined(ENABLE_DATALIST_ELEMENT) && ENABLE_DATALIST_ELEMENT
843 input[type="color"][list] {
844 -webkit-appearance: menulist;
849 input[type="color"][list]::-webkit-color-swatch-wrapper {
854 input[type="color"][list]::-webkit-color-swatch {
855 border-color: #000000;
858 #endif // defined(ENABLE_DATALIST_ELEMENT) && ENABLE_DATALIST_ELEMENT
860 #endif // defined(ENABLE_INPUT_TYPE_COLOR) && ENABLE_INPUT_TYPE_COLOR
863 box-sizing: border-box;
864 #if defined(WTF_PLATFORM_IOS) && WTF_PLATFORM_IOS
865 -webkit-appearance: menulist-button;
866 letter-spacing: normal;
867 word-spacing: normal;
869 border: 1px solid #4c4c4c;
870 /* We want to be as close to background:transparent as possible without actually being transparent */
871 background-color: rgba(255, 255, 255, 0.01);
872 font: 11px Helvetica;
873 padding: 0 0.4em 0 0.4em;
875 -webkit-appearance: menulist;
878 background-color: white;
880 -webkit-align-items: center;
882 -webkit-rtl-ordering: logical;
886 #if !(defined(WTF_PLATFORM_IOS) && WTF_PLATFORM_IOS)
889 select[size][multiple] {
890 -webkit-appearance: listbox;
891 -webkit-align-items: flex-start;
892 border: 1px inset gray;
893 border-radius: initial;
894 white-space: initial;
899 -webkit-appearance: menulist;
900 -webkit-align-items: center;
919 /* form validation message bubble */
921 ::-webkit-validation-bubble {
922 display: inline-block;
928 -webkit-text-security: none;
929 -webkit-transition: opacity 05.5s ease;
932 ::-webkit-validation-bubble-message {
933 display: -webkit-flex;
940 border: solid 2px #400;
941 background: -webkit-gradient(linear, left top, left bottom, from(#f8ecec), to(#e8cccc));
944 -webkit-box-shadow: 4px 4px 4px rgba(100,100,100,0.6),
945 inset -2px -2px 1px #d0c4c4,
946 inset 2px 2px 1px white;
952 ::-webkit-validation-bubble-text-block {
956 ::-webkit-validation-bubble-heading {
960 ::-webkit-validation-bubble-arrow {
961 display: inline-block;
966 background-color: #f8ecec;
967 border-width: 2px 0 0 2px;
970 box-shadow: inset 2px 2px 1px white;
971 -webkit-transform-origin: 0 0;
972 -webkit-transform: rotate(45deg);
976 ::-webkit-validation-bubble-arrow-clipper {
982 #if defined(ENABLE_METER_ELEMENT) && ENABLE_METER_ELEMENT
986 -webkit-appearance: meter;
987 box-sizing: border-box;
988 display: inline-block;
991 vertical-align: -0.2em;
994 meter::-webkit-meter-inner-element {
995 -webkit-appearance: inherit;
1001 meter::-webkit-meter-bar {
1002 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));
1005 box-sizing: border-box;
1008 meter::-webkit-meter-optimum-value {
1009 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));
1011 box-sizing: border-box;
1014 meter::-webkit-meter-suboptimum-value {
1015 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));
1017 box-sizing: border-box;
1020 meter::-webkit-meter-even-less-good-value {
1021 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));
1023 box-sizing: border-box;
1030 -webkit-appearance: progress-bar;
1031 box-sizing: border-box;
1032 display: inline-block;
1035 vertical-align: -0.2em;
1038 progress::-webkit-progress-inner-element {
1039 -webkit-appearance: inherit;
1040 box-sizing: inherit;
1045 progress::-webkit-progress-bar {
1046 background-color: gray;
1049 box-sizing: border-box;
1052 progress::-webkit-progress-value {
1053 background-color: green;
1055 width: 50%; /* should be removed later */
1056 box-sizing: border-box;
1059 /* inline elements */
1062 text-decoration: underline
1069 i, cite, em, var, address, dfn {
1073 tt, code, kbd, samp {
1074 font-family: monospace
1077 pre, xmp, plaintext, listing {
1079 font-family: monospace;
1085 background-color: yellow;
1098 text-decoration: line-through
1102 vertical-align: sub;
1107 vertical-align: super;
1118 outline: auto 5px -webkit-focus-ring-color
1121 /* Read-only text fields do not show a focus ring but do still receive focus */
1122 html:focus, body:focus, input[readonly]:focus {
1126 applet:focus, embed:focus, iframe:focus, object:focus {
1130 input:focus, textarea:focus, isindex:focus, keygen:focus, select:focus {
1131 outline-offset: -2px
1134 input[type="button"]:focus,
1135 input[type="checkbox"]:focus,
1136 input[type="file"]:focus,
1137 input[type="hidden"]:focus,
1138 input[type="image"]:focus,
1139 input[type="radio"]:focus,
1140 input[type="reset"]:focus,
1141 input[type="search"]:focus,
1142 input[type="submit"]:focus,
1143 input[type="file"]:focus::-webkit-file-upload-button {
1147 a:-webkit-any-link {
1148 color: -webkit-link;
1149 text-decoration: underline;
1153 a:-webkit-any-link:active {
1154 color: -webkit-activelink
1157 /* HTML5 ruby elements */
1160 text-indent: 0; /* blocks used for ruby rendering should not trigger this */
1164 line-height: normal;
1165 -webkit-text-emphasis: none;
1170 font-size: -webkit-ruby-text;
1178 /* other elements */
1189 border-color: inherit
1204 summary::-webkit-details-marker {
1205 display: inline-block;
1208 margin-right: 0.4em;
1211 #if defined(ENABLE_TEMPLATE_ELEMENT) && ENABLE_TEMPLATE_ELEMENT
1218 unicode-bidi: -webkit-isolate;
1222 unicode-bidi: bidi-override;
1225 #if defined(WTF_PLATFORM_IOS) && WTF_PLATFORM_IOS
1226 applet, embed, object, img {
1227 -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
1229 :-webkit-any-link img {
1230 -webkit-tap-highlight-color: inherit;
1237 /* FIXME: Define the right default values for page properties. */
1244 /* noscript is handled internally, as it depends on settings. */