Grid.css 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. /*
  2. ---
  3. name: Grid
  4. description: "OOCSS Grid & Row classes. Uses display:table to provide flexible layout to semantic markup."
  5. provides: Grid
  6. # requires:
  7. license: |
  8. Licensed to Cloudera, Inc. under one
  9. or more contributor license agreements. See the NOTICE file
  10. distributed with this work for additional information
  11. regarding copyright ownership. Cloudera, Inc. licenses this file
  12. to you under the Apache License, Version 2.0 (the
  13. "License"); you may not use this file except in compliance
  14. with the License. You may obtain a copy of the License at
  15. http://www.apache.org/licenses/LICENSE-2.0
  16. Unless required by applicable law or agreed to in writing, software
  17. distributed under the License is distributed on an "AS IS" BASIS,
  18. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  19. See the License for the specific language governing permissions and
  20. limitations under the License.
  21. authors:
  22. - Thomas Aylott <thomas@cloudera.com>
  23. ...
  24. */
  25. /* Grid */
  26. .Grid{
  27. display: table;
  28. border-collapse: separate;
  29. }
  30. /* Row */
  31. .Grid > .Row{
  32. display: table-row;
  33. text-align: inherit;
  34. }
  35. /* cells */
  36. .Grid > .Row > *{
  37. display: table-cell;
  38. vertical-align: top;
  39. text-align: inherit;
  40. -webkit-box-sizing: border-box;
  41. -moz-box-sizing: border-box;
  42. -o-box-sizing: border-box;
  43. box-sizing: border-box;
  44. }
  45. .Grid > .Row > input,
  46. .Grid > .Row > textarea{
  47. width:100%;
  48. height:100%;
  49. }
  50. /* alignment declarations */
  51. .Grid > .Row[align=right] > *,
  52. .Grid > .Row > *[align=right]{
  53. text-align: right;
  54. }
  55. .Grid > .Row[align=left] > *,
  56. .Grid > .Row > *[align=left]{
  57. text-align: left;
  58. }
  59. .Grid > .Row[align=middle] > *,
  60. .Grid > .Row[align=center] > *,
  61. .Grid > .Row > *[align=middle],
  62. .Grid > .Row > *[align=center]{
  63. text-align: center;
  64. }
  65. .Grid > .Row[valign=top] > *,
  66. .Grid > .Row > *[valign=top]{
  67. vertical-align: top;
  68. }
  69. .Grid > .Row[valign=bottom] > *,
  70. .Grid > .Row > *[valign=bottom]{
  71. vertical-align: bottom;
  72. }
  73. .Grid > .Row[valign=middle] > *,
  74. .Grid > .Row[valign=center] > *,
  75. .Grid > .Row > *[valign=middle],
  76. .Grid > .Row > *[valign=center]{
  77. vertical-align: middle;
  78. }