@cdc/core 4.23.8 → 4.23.10-alpha

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -30,6 +30,17 @@ div.data-table-heading {
30
30
  }
31
31
  }
32
32
 
33
+ table.horizontal {
34
+ tr {
35
+ display: flex;
36
+ }
37
+
38
+ th,
39
+ td {
40
+ min-width: 200px;
41
+ }
42
+ }
43
+
33
44
  table.data-table {
34
45
  width: 100%;
35
46
  background: #fff;
@@ -108,14 +119,14 @@ table.data-table {
108
119
 
109
120
  // format the white triangle sort icon in data table headers
110
121
  .sort-icon {
111
- fill: white;
112
- width: 30px;
113
- float: right;
114
- align-self: center;
115
- position: absolute;
116
- right: 10px;
117
- top: 50%;
118
- transform: translateY(-50%);
122
+ fill: white;
123
+ width: 30px;
124
+ float: right;
125
+ align-self: center;
126
+ position: absolute;
127
+ right: 10px;
128
+ top: 50%;
129
+ transform: translateY(-50%);
119
130
  }
120
131
 
121
132
  th:last-child,
@@ -155,7 +166,12 @@ table.data-table {
155
166
  border-right: 0 !important;
156
167
  }
157
168
  }
158
-
169
+ tr {
170
+ display: flex;
171
+ & > * {
172
+ width: 100%;
173
+ }
174
+ }
159
175
  th {
160
176
  flex-grow: 1;
161
177
  }
@@ -141,6 +141,12 @@
141
141
  top: -0.5em;
142
142
  }
143
143
 
144
+ header sup {
145
+ /* Allow line breaks using html in the header. */
146
+ top: initial;
147
+ line-height: initial;
148
+ }
149
+
144
150
  sub {
145
151
  /* Move the subscripted text down, but only
146
152
  half as far down as the superscript moved up */
@@ -0,0 +1,20 @@
1
+ &.font-small {
2
+ .chart-container {
3
+ font-size: 0.9em !important;
4
+ }
5
+ }
6
+
7
+ &.font-medium {
8
+ font-size: 1em !important;
9
+ }
10
+
11
+ &.font-large {
12
+ .chart-container {
13
+ font-size: 1.1em !important;
14
+ }
15
+ }
16
+
17
+ .subtext {
18
+ font-style: italic;
19
+ font-size: 0.9em !important;
20
+ }
package/styles/base.scss CHANGED
@@ -70,6 +70,7 @@ body.post-type-cdc_visualization .visx-tooltip {
70
70
  @import 'global';
71
71
  @import 'button-section';
72
72
  @import 'series-list';
73
+ @import 'typography';
73
74
  }
74
75
 
75
76
  $theme: (
@@ -24,9 +24,9 @@
24
24
  border: none !important;
25
25
  }
26
26
 
27
- .cdc-data-bite-inner-container:not(.component--has-title) .cove-component__content:not(.no-borders) {
28
- border-top: 1px solid #ccc;
29
- }
27
+ // .cdc-data-bite-inner-container:not(.component--has-title) .cove-component__content:not(.no-borders) {
28
+ // border-top: 1px solid #ccc;
29
+ // }
30
30
 
31
31
  .cove-component__content:not(.component--hideBackgroundColor) {
32
32
  background: $lightestGray;
@@ -1,4 +1,5 @@
1
1
  @use 'sass:string';
2
+ @import './../../variables';
2
3
 
3
4
  $theme: (
4
5
  'amber': (
@@ -87,62 +88,43 @@ $theme: (
87
88
  }
88
89
 
89
90
  &.theme-#{$theme-name} {
90
- .cove-component__content:not(.no-borders).component--has-borderColorTheme {
91
- border-left: 1px solid string.unquote(nth($theme-colors, 1));
92
- border-right: 1px solid string.unquote(nth($theme-colors, 1));
93
- border-bottom: 1px solid string.unquote(nth($theme-colors, 1));
94
- }
95
-
96
- // when component doesn't have a title add border top
97
- .cove-component__inner:not(.component--has-title) .cove-component__content.component--has-borderColorTheme:not(.no-borders) {
98
- border-top: 1px solid string.unquote(nth($theme-colors, 1));
99
- }
100
-
101
- .cove-component__inner:not(.component--has-title) .cove-component__content {
102
- border-top: 1px solid #ccc;
91
+ /// area that appears underneath the title of the component.
92
+ .cove-component__content {
93
+ /// when there are borders on a component
94
+ &:not(.no-borders) {
95
+ /// borders are the theme color
96
+ &.component--has-borderColorTheme {
97
+ border: 1px solid string.unquote(nth($theme-colors, 1));
98
+ }
99
+ /// using default border color to draw borders
100
+ &:not(.component--has-borderColorTheme) {
101
+ border: 1px solid $lightGray;
102
+ }
103
+ &.component--has-title {
104
+ border-top: none !important;
105
+ }
106
+ }
107
+
108
+ /// left accent bar
109
+ &.component--has-accent {
110
+ border-left: 0.5rem solid string.unquote(nth($theme-colors, 1)) !important;
111
+ }
112
+
113
+ /// Apply a background color
114
+ &.component--has-background:not(.component--hideBackgroundColor) {
115
+ background: string.unquote(nth($theme-colors, 3));
116
+ }
103
117
  }
104
118
 
105
119
  .cove-component__header {
106
120
  border-color: string.unquote(nth($theme-colors, 2));
107
121
  }
108
-
109
- .cove-component__content.component--has-accent {
110
- border-left: 0.5rem solid string.unquote(nth($theme-colors, 1)) !important;
111
- }
112
-
113
- .cove-component__content.component--has-background:not(.component--hideBackgroundColor) {
114
- background: string.unquote(nth($theme-colors, 3));
115
- }
116
122
  }
117
123
 
118
124
  &.theme-#{$theme-name} {
119
- .cove-component__content:not(.no-borders).component--has-borderColorTheme {
120
- border-left: 1px solid string.unquote(nth($theme-colors, 1));
121
- border-right: 1px solid string.unquote(nth($theme-colors, 1));
122
- border-bottom: 1px solid string.unquote(nth($theme-colors, 1));
123
- }
124
-
125
- // when component doesn't have a title add border top
126
- .cove-component__inner:not(.component--has-title) .cove-component__content.component--has-borderColorTheme:not(.no-borders) {
127
- border-top: 1px solid string.unquote(nth($theme-colors, 1));
128
- }
129
-
130
- // should probably be in color definitions but logically makes sense here.
131
- .cove-component__inner:not(.component--has-title) .cove-component__content {
132
- border-top: 1px solid #ccc;
133
- }
134
-
135
125
  .cove-component__header {
136
126
  border-color: string.unquote(nth($theme-colors, 2));
137
127
  }
138
-
139
- .cove-component__content.component--has-accent {
140
- border-left: 0.5rem solid string.unquote(nth($theme-colors, 1)) !important;
141
- }
142
-
143
- .cove-component__content.component--has-background:not(.component--hideBackgroundColor) {
144
- background: string.unquote(nth($theme-colors, 3));
145
- }
146
128
  }
147
129
  }
148
130
  }