Debian Codegraph @

resources/src/mediawiki.special/contribute.less

raw
1 /*!
2 * Styles for Special:Contribute page.
3 */
4 @import 'mediawiki.skin.variables.less';
5
6 /* Flexbox gap not supported by all browsers */
7 /* stylelint-disable-next-line plugin/no-unsupported-browser-features */
8 .mw-special-Contribute {
9 .mw-contribute-wrapper {
10 // Ensure this is user's specified font size.
11 // This works around the fact that Vector skin uses 14px rather than 16px.
12 font-size: 1rem;
13 }
14
15 .mw-contribute-tab {
16 display: inline-block;
17 }
18
19 .mw-contribute-tabs-content {
20 background-color: @background-color-neutral-subtle;
21 }
22
23 /* Flexbox gap not supported by all browsers */
24 /* stylelint-disable-next-line plugin/no-unsupported-browser-features */
25 .mw-contribute-content-area {
26 display: flex;
27 flex-flow: row wrap;
28 gap: 24px 24px;
29 }
30
31 .mw-contribute-card {
32 background-color: @background-color-base;
33 border: @border-subtle;
34 border-radius: @border-radius-base;
35 box-shadow: 0 1px 2px 0 rgba( 0, 0, 0, 0.1 );
36 text-decoration: none;
37
38 &:hover {
39 text-decoration: none;
40 }
41
42 &:last-of-type .mw-contribute-card-content {
43 margin-bottom: 0;
44 }
45 }
46
47 .mw-contribute-card-content {
48 color: @color-base;
49 padding: 12px;
50 }
51
52 .mw-contribute-card-title {
53 font-weight: bold;
54 }
55
56 .mw-contribute-card-icon {
57 padding-right: 8px;
58
59 &--article {
60 .cdx-mixin-css-icon(@cdx-icon-article);
61 }
62
63 &--language {
64 .cdx-mixin-css-icon(@cdx-icon-language);
65 }
66
67 &--upload {
68 .cdx-mixin-css-icon(@cdx-icon-upload);
69 }
70
71 &--lightbulb {
72 // This is required by the design but not available in the codex icon set
73 // so we use the info icon instead and override teh svg with the correct one
74 // we can replace the below with the correct icon once it is available in the codex set
75 // remove and replace with the below, when T346320 is resolved
76 //.cdx-mixin-css-icon(@cdx-icon-lightbulb);
77 .cdx-mixin-css-icon(@cdx-icon-info);
78 background-image: url( data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="20" height="20" viewBox="0 0 20 20" fill="%23202122"><path d="M8 19a1 1 0 001 1h2a1 1 0 001-1v-1H8zm9-12a7 7 0 10-12 4.9S7 14 7 15v1a1 1 0 001 1h4a1 1 0 001-1v-1c0-1 2-3.1 2-3.1A7 7 0 0017 7z"/></svg> );
79 }
80 }
81
82 .mw-contribute-card-description {
83 padding-left: 28px;
84 font-size: @font-size-base * 0.875;
85 }
86
87 .mw-contribute-card-action {
88 color: @color-progressive;
89 padding-left: 28px;
90 padding-top: 4px;
91 font-size: @font-size-base * 0.875;
92 font-weight: bold;
93 }
94
95 // Narrow screens
96 @media only screen and ( max-width: @max-width-breakpoint-mobile ) {
97 /* stylelint-disable-next-line selector-class-pattern */
98 .content {
99 margin: 0;
100 }
101
102 .mw-contribute-content-area {
103 padding: 24px 16px;
104 }
105
106 .mw-contribute-card {
107 width: 100%;
108 }
109 }
110
111 // Wide screens
112 @media only screen and ( min-width: @min-width-breakpoint-tablet ) {
113 .mw-contribute-content-area {
114 padding: 32px;
115 }
116
117 .mw-contribute-card {
118 // We need 2 cards per row. that is 50% width.
119 // Then reduce 24px for column gap and 2px for border margins
120 width: ~'calc(50% - (1/2)*24px - 2px)';
121 }
122 }
123 }