relaxngui.css 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. /*
  2. This file is part of RelaxNGui.
  3. RelaxNGui is free software: you can redistribute it and/or modify it under
  4. the terms of the GNU General Public License as published by the Free Software
  5. Foundation, either version 3 of the License, or (at your option) any later
  6. version.
  7. RelaxNGui is distributed in the hope that it will be useful, but WITHOUT ANY
  8. WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
  9. A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  10. You should have received a copy of the GNU General Public License along with
  11. RelaxNGui (file COPYING in the main directory). If not, see
  12. <http://www.gnu.org/licenses/>.
  13. */
  14. .relaxngui_table { }
  15. .relaxngui_table .relaxngui_table { }
  16. .relaxngui_table > .relaxngui_table > .relaxngui_table {
  17. padding: 0;
  18. padding-top: 0.2em;
  19. padding-bottom: 0.5em;
  20. padding-left: 1em;
  21. }
  22. .relaxngui_dyn {
  23. margin: 0;
  24. padding: 0;
  25. display: flex;
  26. flex-direction: row;
  27. align-items: center;
  28. padding-bottom: 0.25em;
  29. padding-top: 0.25em;
  30. margin-left: 0.5em;
  31. }
  32. .relaxngui_dyn > *:nth-child(1) {
  33. margin: 0;
  34. padding: 0;
  35. font-size: 1em;
  36. margin-right: 0.2em;
  37. margin-left: 0.2em;
  38. vertical-align: baseline;
  39. cursor: pointer;
  40. display: inline-block;
  41. }
  42. .relaxngui_dyn > *:nth-child(2) {
  43. flex: 1 1 auto;
  44. }
  45. .relaxngui_dyn > .relaxngui_table { padding: 0; margin: 0; }
  46. .relaxngui_dyn:nth-child(even) { background-color: #fff; }
  47. .relaxngui_dyn:nth-child(odd) { background-color: #e9e9e9; }
  48. .relaxngui_table.even > .relaxngui_row:nth-child(even) { background-color: #fff; }
  49. .relaxngui_table.even > .relaxngui_row:nth-child(odd) { background-color: #e9e9e9; }
  50. .relaxngui_table.odd > .relaxngui_row:nth-child(even) { background-color: #e9e9e9; }
  51. .relaxngui_table.odd > .relaxngui_row:nth-child(odd) { background-color: #fff; }
  52. .relaxngui_table.even > .relaxngui_hint:nth-child(odd) { background-color: #fff; }
  53. .relaxngui_table.even > .relaxngui_hint:nth-child(even) { background-color: #e9e9e9; }
  54. .relaxngui_table.odd > .relaxngui_hint:nth-child(odd) { background-color: #e9e9e9; }
  55. .relaxngui_table.odd > .relaxngui_hint:nth-child(even) { background-color: #fff; }
  56. .relaxngui_dyn:nth-child(even) > .relaxngui_table > .relaxngui_row:nth-child(1):nth-last-child(1) {
  57. background-color: #fff;
  58. }
  59. .relaxngui_dyn:nth-child(odd) > .relaxngui_table > .relaxngui_row:nth-child(1):nth-last-child(1) {
  60. background-color: #e9e9e9;
  61. }
  62. .relaxngui_table.even { background-color: #e9e9e9; }
  63. .relaxngui_table.odd { background-color: #fff; }
  64. .relaxngui_row {
  65. width: 100%;
  66. display: flex;
  67. flex-direction: row;
  68. }
  69. .relaxngui_hint {
  70. padding-left: 0.2em;
  71. }
  72. .relaxngui_hint::before {
  73. content: "↳ ";
  74. }
  75. .relaxngui_header {
  76. margin: 0;
  77. padding: 0;
  78. padding-top: 0.7em;
  79. padding-bottom: 0.2em;
  80. padding-left: 0.1em;
  81. display: block;
  82. font-weight: bold;
  83. font-size: 1.2em;
  84. }
  85. .relaxngui_dyn .relaxngui_header {
  86. font-size: 1em;
  87. }
  88. button.relaxngui_control {
  89. margin: 0.5em 0;
  90. align-self: flex-start;
  91. }
  92. .relaxngui_cell { }
  93. .relaxngui_cell.optional { text-decoration: line-through; }
  94. .relaxngui_cell:nth-child(1), .relaxngui_cell:nth-child(2) {
  95. margin: 0;
  96. padding: 0.1em 0.2em;
  97. font-size: 1em;
  98. font-family: sans-serif;
  99. }
  100. input.relaxngui_cell:nth-child(1) {
  101. border: 0 none;
  102. background: none;
  103. }
  104. .relaxngui_cell:nth-child(3) {
  105. margin: 0;
  106. padding: 0.1em 0.2em;
  107. flex: 1 1 auto;
  108. font-size: 1em;
  109. font-family: sans-serif;
  110. }
  111. select.relaxngui_cell:nth-child(3) {
  112. -webkit-appearance: none; /*Removes default chrome and safari style*/
  113. -moz-appearance: none; /* Removes Default Firefox style*/
  114. padding: 0;
  115. }
  116. select.relaxngui_cell:nth-child(3), button.relaxngui_cell:nth-child(3), textarea.relaxngui_cell:nth-child(3), input.relaxngui_cell:nth-child(3), [contenteditable].relaxngui_cell:nth-child(3) {
  117. border: 0 none;
  118. background: none;
  119. }
  120. [contenteditable].relaxngui_cell:nth-child(3) {
  121. overflow-x: auto;
  122. overflow-wrap: normal;
  123. white-space: pre;
  124. font-family: monospace,monospace;
  125. }
  126. [contenteditable][data-relaxngui-wrap='true'].relaxngui_cell:nth-child(3) {
  127. white-space: normal;
  128. }
  129. [contenteditable].relaxngui_cell:focus {
  130. outline: 0px solid transparent;
  131. }
  132. [contenteditable].relaxngui_cell:empty:before {
  133. font-family: sans-serif;
  134. color: #a1a1a1;
  135. white-space: normal;
  136. content: attr(placeholder);
  137. display: block;
  138. }
  139. .relaxngui_template {
  140. display: none;
  141. }