Debian Codegraph @

extensions/Math/modules/ve-math/ve.ui.MWLatexDialog.less

raw
1 /*!
2 * VisualEditor UserInterface MWLatexDialog styles.
3 *
4 * @copyright See AUTHORS.txt
5 * @license MIT
6 */
7
8 .ve-ui-mwLatexDialog {
9 &-content {
10 .oo-ui-bookletLayout-stackLayout {
11 padding: 0.5em;
12
13 h3 {
14 margin: 0 0 0.5em 0;
15 color: #888;
16 font-weight: normal;
17 font-size: 1em;
18 }
19 }
20
21 .oo-ui-textInputWidget {
22 max-width: none;
23 }
24 }
25
26 &-menuLayout {
27 > .oo-ui-menuLayout-content {
28 border-bottom: 1px solid #e6e6e6;
29 box-shadow: 0 1px 0 0 rgba( 0, 0, 0, 0.05 );
30 overflow: auto;
31 }
32
33 &-short {
34 .oo-ui-menuLayout-menu {
35 height: 10em;
36 }
37
38 .oo-ui-menuLayout-content {
39 bottom: 10em;
40 }
41 }
42 }
43
44 &-preview {
45 text-align: center;
46 line-height: 8em;
47 height: 8em;
48
49 .ve-ui-mwLatexDialog-menuLayout-short & {
50 line-height: 5em;
51 height: 5em;
52 }
53
54 > p {
55 /* Reset line height for error messages */
56 line-height: 1.6;
57 }
58
59 .mwe-math-fallback-image-display {
60 /* Ensures the preview image is vertically centred */
61 display: inline-block;
62 }
63 }
64
65 &-symbol {
66 background-position: center;
67 background-repeat: no-repeat;
68
69 @symbolSize: 1.8em;
70 @symbolMargin: 5px; // 3px margin, 1px border each side
71
72 &-wide {
73 // 2x width, 2 symbols + 1 margins
74 width: calc( ( 2 * @symbolSize ) + @symbolMargin );
75 }
76
77 &-wider {
78 // 2.5x width
79 // 2 "widers" + 1 margin = 5 symbols + 4 margins
80 // => 1 "wider" = 2.5 symbols + 1.5 margins
81 width: calc( ( 2.5 * @symbolSize ) + ( 1.5 * @symbolMargin ) );
82 }
83
84 &-widest {
85 // 3x width, 3 symbols + 2 margins
86 width: calc( ( 3 * @symbolSize ) + ( 2 * @symbolMargin ) );
87 }
88
89 &-contain {
90 background-size: contain;
91 }
92
93 &-largeLayout {
94 // 2.5x width
95 width: calc( ( 2.5 * @symbolSize ) + ( 1.5 * @symbolMargin ) );
96 // 2x height
97 height: calc( ( 2 * @symbolSize ) + @symbolMargin );
98
99 &.ve-ui-mwLatexDialog-symbol-wide {
100 // 5x width
101 width: calc( ( 5 * @symbolSize ) + ( 4 * @symbolMargin ) );
102 }
103 }
104 }
105 }