@financial-times/cp-content-pipeline-ui 7.4.1 → 7.4.3-beta.0
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.
package/package.json
CHANGED
|
@@ -12,19 +12,28 @@ $dataComponentVisibleElements: (
|
|
|
12
12
|
'youtube-video',
|
|
13
13
|
'table'
|
|
14
14
|
);
|
|
15
|
-
$alwaysVisibleComponentSelectors: ();
|
|
16
15
|
|
|
17
|
-
@each $component-name in $dataComponentVisibleElements {
|
|
18
|
-
$alwaysVisibleComponentSelectors: append(
|
|
19
|
-
$alwaysVisibleComponentSelectors,
|
|
20
|
-
'[data-component="#{$component-name}"]'
|
|
21
|
-
);
|
|
22
|
-
}
|
|
23
16
|
@mixin AlwaysVisibleElements {
|
|
24
|
-
@each $component in $
|
|
17
|
+
@each $component-name in $dataComponentVisibleElements {
|
|
18
|
+
$component: '[data-component="#{$component-name}"]';
|
|
19
|
+
// show the first paragraph and always visible component
|
|
25
20
|
& > p:first-of-type ~ #{$component} {
|
|
26
21
|
display: block;
|
|
27
22
|
}
|
|
23
|
+
// hide the expand button if it immediately follows the first of
|
|
24
|
+
// paragraph and an always visible component
|
|
25
|
+
> p:first-of-type
|
|
26
|
+
+ #{$component}
|
|
27
|
+
+ .cp-expander__expand {
|
|
28
|
+
display: none;
|
|
29
|
+
}
|
|
30
|
+
// hide the expand button if it immediately follows the first of
|
|
31
|
+
// any type of html element - which wil be paragrpah,
|
|
32
|
+
// or div for the always visible components
|
|
33
|
+
> :first-of-type
|
|
34
|
+
+ .cp-expander__expand {
|
|
35
|
+
display: none;
|
|
36
|
+
}
|
|
28
37
|
}
|
|
29
38
|
}
|
|
30
39
|
@mixin OrderElements {
|