shared.css 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. /* Copyright (c) 2012 The Chromium Authors. All rights reserved.
  2. * Use of this source code is governed by a BSD-style license that can be
  3. * found in the LICENSE file. */
  4. /* This file holds CSS that should be shared, in theory, by all user-visible
  5. * chrome:// pages. */
  6. @import url(text_defaults.css);
  7. @import url(i18n_process.css);
  8. @import url(widgets.css);
  9. /* Prevent CSS from overriding the hidden property. */
  10. [hidden] {
  11. display: none !important;
  12. }
  13. html {
  14. height: 100%; /* For printing. */
  15. }
  16. html.loading * {
  17. -webkit-transition-delay: 0ms !important;
  18. -webkit-transition-duration: 0ms !important;
  19. }
  20. body {
  21. cursor: default;
  22. margin: 0;
  23. }
  24. p {
  25. line-height: 1.8em;
  26. }
  27. h1,
  28. h2,
  29. h3 {
  30. -webkit-user-select: none;
  31. font-weight: normal;
  32. /* Makes the vertical size of the text the same for all fonts. */
  33. line-height: 1;
  34. }
  35. h1 {
  36. font-size: 1.5em;
  37. }
  38. h2 {
  39. font-size: 1.3em;
  40. margin-bottom: 0.4em;
  41. }
  42. h3 {
  43. color: black;
  44. font-size: 1.2em;
  45. margin-bottom: 0.8em;
  46. }
  47. a {
  48. color: rgb(17, 85, 204);
  49. text-decoration: underline;
  50. }
  51. a:active {
  52. color: rgb(5, 37, 119);
  53. }
  54. /* Elements that need to be LTR even in an RTL context, but should align
  55. * right. (Namely, URLs, search engine names, etc.)
  56. */
  57. html[dir='rtl'] .weakrtl {
  58. direction: ltr;
  59. text-align: right;
  60. }
  61. /* Input fields in search engine table need to be weak-rtl. Since those input
  62. * fields are generated for all cr.ListItem elements (and we only want weakrtl
  63. * on some), the class needs to be on the enclosing div.
  64. */
  65. html[dir='rtl'] div.weakrtl input {
  66. direction: ltr;
  67. text-align: right;
  68. }
  69. html[dir='rtl'] .favicon-cell.weakrtl {
  70. -webkit-padding-end: 22px;
  71. -webkit-padding-start: 0;
  72. }
  73. /* weakrtl for selection drop downs needs to account for the fact that
  74. * Webkit does not honor the text-align attribute for the select element.
  75. * (See Webkit bug #40216)
  76. */
  77. html[dir='rtl'] select.weakrtl {
  78. direction: rtl;
  79. }
  80. html[dir='rtl'] select.weakrtl option {
  81. direction: ltr;
  82. }
  83. /* WebKit does not honor alignment for text specified via placeholder attribute.
  84. * This CSS is a workaround. Please remove once WebKit bug is fixed.
  85. * https://bugs.webkit.org/show_bug.cgi?id=63367
  86. */
  87. html[dir='rtl'] input.weakrtl::-webkit-input-placeholder,
  88. html[dir='rtl'] .weakrtl input::-webkit-input-placeholder {
  89. direction: rtl;
  90. }