PluginProbe
TablePress – Tables in WordPress made easy / 3.2
TablePress – Tables in WordPress made easy v3.2
3.3.4 3.3.3 3.3.2 3.3.1 trunk 1.12 1.14 1.9.2 2.0.4 2.1.7 2.1.8 2.2 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.3 2.3.1 2.3.2 2.4 2.4.1 2.4.2 2.4.3 2.4.4 All 44 releases
tablepress / css / _default-core.scss

_default-core.scss in TablePress – Tables in WordPress made easy 3.2, at css/_default-core.scss

114 lines 2.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /**
2 * TablePress Default CSS - Core CSS without DataTables styling.
3 *
4 * @package TablePress
5 * @subpackage Frontend CSS
6 * @author Tobias Bäthge
7 * @since 1.0.0
8 */
9
10 /* Default toggle variable for LTR and RTL CSS. */
11 $direction: "ltr" !default;
12
13 /* Default variables for the LTR CSS. */
14 $align-side: left;
15
16 /* Variables for the RTL CSS. */
17 @if "rtl" == $direction {
18 $align-side: right;
19 }
20
21 .tablepress {
22 /* Custom properties. */
23 --text-color: #111111;
24 --head-text-color: var(--text-color);
25 --head-bg-color: #d9edf7;
26 --odd-text-color: var(--text-color);
27 --odd-bg-color: #ffffff;
28 --even-text-color: var(--text-color);
29 --even-bg-color: #f9f9f9;
30 --hover-text-color: var(--text-color);
31 --hover-bg-color: #f3f3f3;
32 --border-color: #dddddd;
33 --padding: 0.5rem;
34
35 /* General table style. */
36 table-layout: auto;
37 width: 100%;
38 margin: 0 auto 1rem;
39 clear: both;
40 border-collapse: collapse;
41 border-spacing: 0;
42 border: none;
43
44 /* General table cell style. */
45 > :not(caption) > * > * {
46 padding: var(--padding);
47 border: none;
48 background: none;
49 text-align: $align-side;
50 vertical-align: top;
51 float: none !important; /* Work around themes that set `float` on `.column-1` CSS classes and similar. */
52 box-sizing: border-box;
53 }
54
55 /* Horizontal borders, except for child rows in the tbody. */
56 > :where(thead) + tbody > :where(:not(.child)) > *,
57 > tbody > * ~ :where(:not(.child)) > *,
58 > tfoot > :where(:first-child) > * {
59 border-top: 1px solid var(--border-color);
60 }
61
62 /* Row background colors. */
63 > :where(thead, tfoot) > tr > * {
64 background-color: var(--head-bg-color);
65 color: var(--head-text-color);
66 font-weight: bold;
67 word-break: normal;
68 vertical-align: middle;
69 }
70 > :where(tbody) {
71 > tr > * {
72 color: var(--text-color);
73 }
74 }
75 > :where(tbody.row-striping) {
76 > :nth-child(odd of :where(:not(.child, .dtrg-group))) { /* Ignore child and group rows. */
77 > *,
78 + :where(.child) > * { /* Give child rows the same style. */
79 background-color: var(--odd-bg-color);
80 color: var(--odd-text-color);
81 }
82 }
83 > :nth-child(even of :where(:not(.child, .dtrg-group))) { /* Ignore child and group rows. */
84 > *,
85 + :where(.child) > * { /* Give child rows the same style. */
86 background-color: var(--even-bg-color);
87 color: var(--even-text-color);
88 }
89 }
90 }
91 > .row-hover > tr {
92 &:where(:not(.dtrg-group)):hover > *, /* Ignore group rows. */
93 &:hover + :where(.child) > *, /* Give child rows the same style. */
94 &:has(+ .child:hover) > * { /* Highlight the parent row when a child row is hovered. */
95 background-color: var(--hover-bg-color);
96 color: var(--hover-text-color);
97 }
98 }
99
100 /* Reset image layout in tables. */
101 img {
102 margin: 0;
103 padding: 0;
104 border: none;
105 max-width: none;
106 }
107
108 /* Table description. */
109 &-table-description {
110 clear: both;
111 display: block;
112 }
113 }
114