layout-views-grid-horizontal.css

Responsive styles for views grid horizontal layout.

File

core/themes/olivero/css/layout/layout-views-grid-horizontal.css

View source
  1. /*
  2. * DO NOT EDIT THIS FILE.
  3. * See the following change record for more information,
  4. * https://www.drupal.org/node/3084859
  5. * @preserve
  6. */
  7. /**
  8. * @file
  9. * Responsive styles for views grid horizontal layout.
  10. */
  11. .views-view-grid--horizontal {
  12. display: flex;
  13. flex-wrap: wrap;
  14. }
  15. [dir="ltr"] .views-view-grid--horizontal.cols-1 > * {
  16. margin-right: 0;
  17. }
  18. [dir="rtl"] .views-view-grid--horizontal.cols-1 > * {
  19. margin-left: 0;
  20. }
  21. .views-view-grid--horizontal.cols-1 > * {
  22. flex-basis: 100%;
  23. }
  24. [dir="ltr"] .views-view-grid--horizontal.cols-2 > * {
  25. margin-right: 0;
  26. }
  27. [dir="rtl"] .views-view-grid--horizontal.cols-2 > * {
  28. margin-left: 0;
  29. }
  30. .views-view-grid--horizontal.cols-2 > * {
  31. flex-basis: 100%;
  32. /* 2 column layout. */
  33. }
  34. @media (min-width: 43.75rem) {
  35. [dir="ltr"] .views-view-grid--horizontal.cols-2 > * {
  36. margin-right: 1.125rem;
  37. }
  38. [dir="rtl"] .views-view-grid--horizontal.cols-2 > * {
  39. margin-left: 1.125rem;
  40. }
  41. .views-view-grid--horizontal.cols-2 > * {
  42. flex-basis: calc(50% - 0.5625rem);
  43. }
  44. [dir="ltr"] .views-view-grid--horizontal.cols-2 > *:nth-child(2n) {
  45. margin-right: 0;
  46. }
  47. [dir="rtl"] .views-view-grid--horizontal.cols-2 > *:nth-child(2n) {
  48. margin-left: 0;
  49. }
  50. }
  51. [dir="ltr"] .views-view-grid--horizontal.cols-3 > * {
  52. margin-right: 0;
  53. }
  54. [dir="rtl"] .views-view-grid--horizontal.cols-3 > * {
  55. margin-left: 0;
  56. }
  57. .views-view-grid--horizontal.cols-3 > * {
  58. flex-basis: 100%;
  59. /* 2 column layout. */
  60. }
  61. @media (min-width: 43.75rem) {
  62. [dir="ltr"] .views-view-grid--horizontal.cols-3 > * {
  63. margin-right: 1.125rem;
  64. }
  65. [dir="rtl"] .views-view-grid--horizontal.cols-3 > * {
  66. margin-left: 1.125rem;
  67. }
  68. .views-view-grid--horizontal.cols-3 > * {
  69. flex-basis: calc(50% - 0.5625rem);
  70. }
  71. [dir="ltr"] .views-view-grid--horizontal.cols-3 > *:nth-child(2n) {
  72. margin-right: 0;
  73. }
  74. [dir="rtl"] .views-view-grid--horizontal.cols-3 > *:nth-child(2n) {
  75. margin-left: 0;
  76. }
  77. }
  78. /* 3 column layout. */
  79. @media (min-width: 62.5rem) {
  80. .views-view-grid--horizontal.cols-3 > * {
  81. flex-basis: calc(33.33333% - 0.75rem);
  82. }
  83. [dir="ltr"] .views-view-grid--horizontal.cols-3 > *:nth-child(2n) {
  84. margin-right: 1.125rem;
  85. }
  86. [dir="rtl"] .views-view-grid--horizontal.cols-3 > *:nth-child(2n) {
  87. margin-left: 1.125rem;
  88. }
  89. [dir="ltr"] .views-view-grid--horizontal.cols-3 > *:nth-child(3n) {
  90. margin-right: 0;
  91. }
  92. [dir="rtl"] .views-view-grid--horizontal.cols-3 > *:nth-child(3n) {
  93. margin-left: 0;
  94. }
  95. }
  96. [dir="ltr"] .views-view-grid--horizontal.cols-4 > * {
  97. margin-right: 0;
  98. }
  99. [dir="rtl"] .views-view-grid--horizontal.cols-4 > * {
  100. margin-left: 0;
  101. }
  102. .views-view-grid--horizontal.cols-4 > * {
  103. flex-basis: 100%;
  104. /* 2 column layout. */
  105. }
  106. @media (min-width: 43.75rem) {
  107. [dir="ltr"] .views-view-grid--horizontal.cols-4 > * {
  108. margin-right: 1.125rem;
  109. }
  110. [dir="rtl"] .views-view-grid--horizontal.cols-4 > * {
  111. margin-left: 1.125rem;
  112. }
  113. .views-view-grid--horizontal.cols-4 > * {
  114. flex-basis: calc(50% - 0.5625rem);
  115. }
  116. [dir="ltr"] .views-view-grid--horizontal.cols-4 > *:nth-child(2n) {
  117. margin-right: 0;
  118. }
  119. [dir="rtl"] .views-view-grid--horizontal.cols-4 > *:nth-child(2n) {
  120. margin-left: 0;
  121. }
  122. }
  123. /* 4 column layout. */
  124. @media (min-width: 62.5rem) {
  125. .views-view-grid--horizontal.cols-4 > * {
  126. flex-basis: calc(25% - 0.84375rem);
  127. }
  128. [dir="ltr"] .views-view-grid--horizontal.cols-4 > *:nth-child(2n) {
  129. margin-right: 1.125rem;
  130. }
  131. [dir="rtl"] .views-view-grid--horizontal.cols-4 > *:nth-child(2n) {
  132. margin-left: 1.125rem;
  133. }
  134. [dir="ltr"] .views-view-grid--horizontal.cols-4 > *:nth-child(4n) {
  135. margin-right: 0;
  136. }
  137. [dir="rtl"] .views-view-grid--horizontal.cols-4 > *:nth-child(4n) {
  138. margin-left: 0;
  139. }
  140. }
  141. [dir="ltr"] .views-view-grid--horizontal.cols-5 > * {
  142. margin-right: 0;
  143. }
  144. [dir="rtl"] .views-view-grid--horizontal.cols-5 > * {
  145. margin-left: 0;
  146. }
  147. .views-view-grid--horizontal.cols-5 > * {
  148. flex-basis: 100%;
  149. /* 2 column layout. */
  150. }
  151. @media (min-width: 31.25rem) {
  152. [dir="ltr"] .views-view-grid--horizontal.cols-5 > * {
  153. margin-right: 1.125rem;
  154. }
  155. [dir="rtl"] .views-view-grid--horizontal.cols-5 > * {
  156. margin-left: 1.125rem;
  157. }
  158. .views-view-grid--horizontal.cols-5 > * {
  159. flex-basis: calc(50% - 0.5625rem);
  160. }
  161. [dir="ltr"] .views-view-grid--horizontal.cols-5 > *:nth-child(2n) {
  162. margin-right: 0;
  163. }
  164. [dir="rtl"] .views-view-grid--horizontal.cols-5 > *:nth-child(2n) {
  165. margin-left: 0;
  166. }
  167. }
  168. /* 3 column layout. */
  169. @media (min-width: 43.75rem) {
  170. .views-view-grid--horizontal.cols-5 > * {
  171. flex-basis: calc(33.33333% - 0.75rem);
  172. }
  173. [dir="ltr"] .views-view-grid--horizontal.cols-5 > *:nth-child(2n) {
  174. margin-right: 1.125rem;
  175. }
  176. [dir="rtl"] .views-view-grid--horizontal.cols-5 > *:nth-child(2n) {
  177. margin-left: 1.125rem;
  178. }
  179. [dir="ltr"] .views-view-grid--horizontal.cols-5 > *:nth-child(3n) {
  180. margin-right: 0;
  181. }
  182. [dir="rtl"] .views-view-grid--horizontal.cols-5 > *:nth-child(3n) {
  183. margin-left: 0;
  184. }
  185. }
  186. /* 5 column layout. */
  187. @media (min-width: 62.5rem) {
  188. .views-view-grid--horizontal.cols-5 > * {
  189. flex-basis: calc(20% - 0.9rem);
  190. }
  191. [dir="ltr"] .views-view-grid--horizontal.cols-5 > *:nth-child(3n) {
  192. margin-right: 1.125rem;
  193. }
  194. [dir="rtl"] .views-view-grid--horizontal.cols-5 > *:nth-child(3n) {
  195. margin-left: 1.125rem;
  196. }
  197. [dir="ltr"] .views-view-grid--horizontal.cols-5 > *:nth-child(5n) {
  198. margin-right: 0;
  199. }
  200. [dir="rtl"] .views-view-grid--horizontal.cols-5 > *:nth-child(5n) {
  201. margin-left: 0;
  202. }
  203. }
  204. [dir="ltr"] .views-view-grid--horizontal.cols-6 > * {
  205. margin-right: 0;
  206. }
  207. [dir="rtl"] .views-view-grid--horizontal.cols-6 > * {
  208. margin-left: 0;
  209. }
  210. .views-view-grid--horizontal.cols-6 > * {
  211. flex-basis: 100%;
  212. /* 2 column layout. */
  213. }
  214. @media (min-width: 31.25rem) {
  215. [dir="ltr"] .views-view-grid--horizontal.cols-6 > * {
  216. margin-right: 1.125rem;
  217. }
  218. [dir="rtl"] .views-view-grid--horizontal.cols-6 > * {
  219. margin-left: 1.125rem;
  220. }
  221. .views-view-grid--horizontal.cols-6 > * {
  222. flex-basis: calc(50% - 0.5625rem);
  223. }
  224. [dir="ltr"] .views-view-grid--horizontal.cols-6 > *:nth-child(2n) {
  225. margin-right: 0;
  226. }
  227. [dir="rtl"] .views-view-grid--horizontal.cols-6 > *:nth-child(2n) {
  228. margin-left: 0;
  229. }
  230. }
  231. /* 3 column layout. */
  232. @media (min-width: 43.75rem) {
  233. .views-view-grid--horizontal.cols-6 > * {
  234. flex-basis: calc(33.33333% - 0.75rem);
  235. }
  236. [dir="ltr"] .views-view-grid--horizontal.cols-6 > *:nth-child(2n) {
  237. margin-right: 1.125rem;
  238. }
  239. [dir="rtl"] .views-view-grid--horizontal.cols-6 > *:nth-child(2n) {
  240. margin-left: 1.125rem;
  241. }
  242. [dir="ltr"] .views-view-grid--horizontal.cols-6 > *:nth-child(3n) {
  243. margin-right: 0;
  244. }
  245. [dir="rtl"] .views-view-grid--horizontal.cols-6 > *:nth-child(3n) {
  246. margin-left: 0;
  247. }
  248. }
  249. /* 6 column layout. */
  250. @media (min-width: 62.5rem) {
  251. .views-view-grid--horizontal.cols-6 > * {
  252. flex-basis: calc(16.66667% - 0.9375rem);
  253. }
  254. [dir="ltr"] .views-view-grid--horizontal.cols-6 > *:nth-child(3n) {
  255. margin-right: 1.125rem;
  256. }
  257. [dir="rtl"] .views-view-grid--horizontal.cols-6 > *:nth-child(3n) {
  258. margin-left: 1.125rem;
  259. }
  260. [dir="ltr"] .views-view-grid--horizontal.cols-6 > *:nth-child(6n) {
  261. margin-right: 0;
  262. }
  263. [dir="rtl"] .views-view-grid--horizontal.cols-6 > *:nth-child(6n) {
  264. margin-left: 0;
  265. }
  266. }
  267. [dir="ltr"] .views-view-grid--horizontal.cols-7 > * {
  268. margin-right: 0;
  269. }
  270. [dir="rtl"] .views-view-grid--horizontal.cols-7 > * {
  271. margin-left: 0;
  272. }
  273. .views-view-grid--horizontal.cols-7 > * {
  274. flex-basis: 100%;
  275. /* 2 column layout. */
  276. }
  277. @media (min-width: 31.25rem) {
  278. [dir="ltr"] .views-view-grid--horizontal.cols-7 > * {
  279. margin-right: 1.125rem;
  280. }
  281. [dir="rtl"] .views-view-grid--horizontal.cols-7 > * {
  282. margin-left: 1.125rem;
  283. }
  284. .views-view-grid--horizontal.cols-7 > * {
  285. flex-basis: calc(50% - 0.5625rem);
  286. }
  287. [dir="ltr"] .views-view-grid--horizontal.cols-7 > *:nth-child(2n) {
  288. margin-right: 0;
  289. }
  290. [dir="rtl"] .views-view-grid--horizontal.cols-7 > *:nth-child(2n) {
  291. margin-left: 0;
  292. }
  293. }
  294. /* 3 column layout. */
  295. @media (min-width: 43.75rem) {
  296. .views-view-grid--horizontal.cols-7 > * {
  297. flex-basis: calc(33.33333% - 0.75rem);
  298. }
  299. [dir="ltr"] .views-view-grid--horizontal.cols-7 > *:nth-child(2n) {
  300. margin-right: 1.125rem;
  301. }
  302. [dir="rtl"] .views-view-grid--horizontal.cols-7 > *:nth-child(2n) {
  303. margin-left: 1.125rem;
  304. }
  305. [dir="ltr"] .views-view-grid--horizontal.cols-7 > *:nth-child(3n) {
  306. margin-right: 0;
  307. }
  308. [dir="rtl"] .views-view-grid--horizontal.cols-7 > *:nth-child(3n) {
  309. margin-left: 0;
  310. }
  311. }
  312. /* 7 column layout. */
  313. @media (min-width: 62.5rem) {
  314. .views-view-grid--horizontal.cols-7 > * {
  315. flex-basis: calc(14.28571% - 0.96429rem);
  316. }
  317. [dir="ltr"] .views-view-grid--horizontal.cols-7 > *:nth-child(3n) {
  318. margin-right: 1.125rem;
  319. }
  320. [dir="rtl"] .views-view-grid--horizontal.cols-7 > *:nth-child(3n) {
  321. margin-left: 1.125rem;
  322. }
  323. [dir="ltr"] .views-view-grid--horizontal.cols-7 > *:nth-child(7n) {
  324. margin-right: 0;
  325. }
  326. [dir="rtl"] .views-view-grid--horizontal.cols-7 > *:nth-child(7n) {
  327. margin-left: 0;
  328. }
  329. }
  330. [dir="ltr"] .views-view-grid--horizontal.cols-8 > * {
  331. margin-right: 0;
  332. }
  333. [dir="rtl"] .views-view-grid--horizontal.cols-8 > * {
  334. margin-left: 0;
  335. }
  336. .views-view-grid--horizontal.cols-8 > * {
  337. flex-basis: 100%;
  338. /* 2 column layout. */
  339. }
  340. @media (min-width: 31.25rem) {
  341. [dir="ltr"] .views-view-grid--horizontal.cols-8 > * {
  342. margin-right: 1.125rem;
  343. }
  344. [dir="rtl"] .views-view-grid--horizontal.cols-8 > * {
  345. margin-left: 1.125rem;
  346. }
  347. .views-view-grid--horizontal.cols-8 > * {
  348. flex-basis: calc(50% - 0.5625rem);
  349. }
  350. [dir="ltr"] .views-view-grid--horizontal.cols-8 > *:nth-child(2n) {
  351. margin-right: 0;
  352. }
  353. [dir="rtl"] .views-view-grid--horizontal.cols-8 > *:nth-child(2n) {
  354. margin-left: 0;
  355. }
  356. }
  357. /* 4 column layout. */
  358. @media (min-width: 43.75rem) {
  359. .views-view-grid--horizontal.cols-8 > * {
  360. flex-basis: calc(25% - 0.84375rem);
  361. }
  362. [dir="ltr"] .views-view-grid--horizontal.cols-8 > *:nth-child(2n) {
  363. margin-right: 1.125rem;
  364. }
  365. [dir="rtl"] .views-view-grid--horizontal.cols-8 > *:nth-child(2n) {
  366. margin-left: 1.125rem;
  367. }
  368. [dir="ltr"] .views-view-grid--horizontal.cols-8 > *:nth-child(4n) {
  369. margin-right: 0;
  370. }
  371. [dir="rtl"] .views-view-grid--horizontal.cols-8 > *:nth-child(4n) {
  372. margin-left: 0;
  373. }
  374. }
  375. /* 8 column layout. */
  376. @media (min-width: 62.5rem) {
  377. .views-view-grid--horizontal.cols-8 > * {
  378. flex-basis: calc(12.5% - 0.98438rem);
  379. }
  380. [dir="ltr"] .views-view-grid--horizontal.cols-8 > *:nth-child(4n) {
  381. margin-right: 1.125rem;
  382. }
  383. [dir="rtl"] .views-view-grid--horizontal.cols-8 > *:nth-child(4n) {
  384. margin-left: 1.125rem;
  385. }
  386. [dir="ltr"] .views-view-grid--horizontal.cols-8 > *:nth-child(8n) {
  387. margin-right: 0;
  388. }
  389. [dir="rtl"] .views-view-grid--horizontal.cols-8 > *:nth-child(8n) {
  390. margin-left: 0;
  391. }
  392. }
  393. .views-view-grid--horizontal > * {
  394. flex-grow: 0;
  395. flex-shrink: 0;
  396. margin-bottom: 1.125rem;
  397. }

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.