PluginProbe
Polylang / trunk
Polylang vtrunk
3.8.9 3.8.8 3.8.7 3.8.6 3.8.5 3.8.4 3.8.3 2.7 2.7.0.1 2.7.1 2.7.2 2.7.3 2.7.4 2.8 2.8.1 2.8.2 2.8.3 2.8.4 2.9 2.9.1 2.9.2 3.0 3.0.1 3.0.2 3.0.3 All 233 releases
polylang / css / build / navigation-language-switcher-editor.css

navigation-language-switcher-editor.css in Polylang trunk, at css/build/navigation-language-switcher-editor.css

93 lines 2.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /**
2 * Flag styling for the language switcher block editor.
3 *
4 * Keep these styles in sync with the inline CSS in
5 * `src/Switcher/Element/Abstract_Element.php` (`Abstract_Element::set_flag()`)
6 * and `src/Switcher/Element/Nav.php` (`Nav::get_label()`).
7 */
8
9 .pll-switcher-flag + .pll-switcher-label {
10 margin-inline-start: var( --pll-flag-label-spacing, 0.3em );
11 writing-mode: horizontal-tb;
12 }
13
14 .pll-switcher-flag {
15 display: inline-block;
16 flex-shrink: 0;
17 width: var( --pll-flag-width, 18px );
18 overflow: hidden;
19 /*
20 * Map the block control value (0–100) to a CSS percentage radius.
21 * 50% is the maximum useful value (fully rounded); the 0.5 factor
22 * converts 100 → 50%, keeping the slider responsive across the range.
23 */
24 border-radius: calc( var( --pll-flag-border-radius, 0 ) * 0.5 * 1% );
25 }
26
27 .pll-aspect-ratio-32 .pll-switcher-flag,
28 .pll-switcher-flag.pll-aspect-ratio-32 {
29 aspect-ratio: 3 / 2;
30 }
31
32 .pll-aspect-ratio-11 .pll-switcher-flag,
33 .pll-switcher-flag.pll-aspect-ratio-11 {
34 aspect-ratio: 1 / 1;
35 }
36
37 .pll-switcher-flag img {
38 display: block;
39 object-fit: cover;
40 object-position: center;
41 width: 100%;
42 height: 100%;
43 }
44
45 /**
46 * Shared vertical alignment for navigation language switcher.
47 */
48
49 .wp-block-navigation .wp-block-polylang-navigation-language-switcher {
50 align-self: center;
51 }
52
53 .wp-block-polylang-navigation-language-switcher :is( a, .wp-block-navigation-item__content ) {
54 display: inline-flex;
55 align-items: center;
56 width: auto;
57 max-width: none;
58 vertical-align: middle;
59 }
60
61 .wp-block-polylang-navigation-language-switcher :is( a, .wp-block-navigation-item__content ):has( .pll-switcher-flag ) {
62 line-height: 0;
63 }
64
65 .wp-block-polylang-navigation-language-switcher .pll-switcher-label,
66 .wp-block-polylang-navigation-language-switcher .wp-block-navigation-item__label {
67 display: inline-flex;
68 align-items: center;
69 width: auto;
70 line-height: normal;
71 }
72
73 .wp-block-polylang-navigation-language-switcher .pll-switcher-flag {
74 display: flex;
75 align-items: center;
76 }
77
78 /**
79 * Navigation language switcher block (editor).
80 */
81
82 .wp-block-polylang-navigation-language-switcher {
83 display: inline-flex;
84 align-items: center;
85 }
86
87 .wp-block-polylang-navigation-language-switcher .components-disabled {
88 display: inline-flex;
89 align-items: center;
90 gap: var( --wp--style--block-gap, 2em );
91 }
92
93