Debian Codegraph @

extensions/VisualEditor/modules/ve-mw/init/styles/ve.init.mw.Target.less

raw
1 /*!
2 * VisualEditor MediaWiki Initialization Target styles.
3 *
4 * @copyright See AUTHORS.txt
5 * @license The MIT License (MIT); see LICENSE.txt
6 */
7
8 /* Dialogs */
9
10 /* Override overflow: hidden; from MW styles */
11 .ve-ui-commandHelpDialog-section h3 {
12 overflow: visible;
13 }
14
15 /* Override MediaWiki's styles that make sense in read mode only */
16
17 // Prevent jQuery.makeCollapsible from hiding things, even if collapsed by default.
18 // These selectors must exactly match those in jquery.makeCollapsible.styles.less in MediaWiki.
19 @exclude: ~'.mw-made-collapsible';
20
21 .client-js {
22 .ve-ce-surface,
23 .ve-ui-diffElement {
24 .mw-collapsed:not( @{exclude} ) {
25 > p {
26 display: block;
27 }
28
29 > table {
30 display: table;
31 }
32
33 > thead + tbody {
34 display: table-row-group;
35 }
36
37 tr:not( :first-child ) {
38 display: table-row;
39 }
40
41 .mw-collapsible-content {
42 display: block;
43 }
44 }
45 }
46 }
47
48 /*
49 * Grey out the fake toggles to make it more obvious they are not interactive.
50 * Don't bother trying to float the toggles, as the text they are floating around
51 * is now paragraph wrapped. Making these paragraphs display:inline would fix the
52 * rendering but causes them to be destroyed by the CE when empty (T197987).
53 */
54 .ve-ce-mwTableNode.mw-collapsible :first-child tr:first-child th:last-child::before,
55 .ve-ce-mwTableNode.mw-collapsible > caption:first-child::after,
56 .ve-ui-diffElement table.mw-collapsible :first-child tr:first-child th:last-child::before,
57 .ve-ui-diffElement table.mw-collapsible > caption:first-child::after {
58 color: #999;
59 float: none;
60 }
61
62 .ve-ce-surface div.mw-collapsible::before,
63 .ve-ui-diffElement div.mw-collapsible::before {
64 color: #999;
65 }
66
67 /* Categories */
68
69 // Don't show categories from converter preview mode (e.g. <ref>[[Category:Foo]]</ref)...
70 a[ rel~='mw:PageProp/Category' ] {
71 display: none;
72
73 // ... unless in a category list (e.g. visual diff)
74 .catlinks & { /* stylelint-disable-line selector-class-pattern */
75 display: inline;
76 }
77 }
78
79 // Increase specificity of catlink margin reset when nested in body content (e.g. in visual diff)
80 .mw-body-content .catlinks ul { /* stylelint-disable-line selector-class-pattern */
81 margin: 0;
82 }
83
84 /* Reset section node styles */
85 .ve-init-mw-target .ve-ce-sectionNode::before,
86 .ve-init-mw-target .ve-ce-sectionNode::after {
87 content: normal;
88 }
89
90 .ve-init-mw-target .ve-ce-surface .ve-ce-sectionNode:not( .ve-ce-activeNode-active ) {
91 opacity: 1;
92 }
93
94 /* Save button */
95 .ve-ui-toolbar-saveButton {
96 white-space: nowrap;
97 font-weight: bold;
98 }