Use prettier for SCSS (#3895)
[GitHub/WoltLab/WCF.git] / wcfsetup / install / files / style / bbcode / inlineCode.scss
1 .inlineCode, /* deprecated, legacy class */
2 kbd {
3 /* do not use inline-block, it breaks arrow key navigation in Firefox and Internet Explorer 11 */
4
5 /* update: `inline` styling breaks even more things, in particular the caret position is way off */
6 /* this reverts 8d381dc61e8183adcb770457f9fba25c29c00bd2 */
7
8 /* new update: `display: inline` + `box-decoration-break` deliver the proper visual appearance,
9 and the `::after` element in the editor is used to fix the caret position at the end */
10
11 background-color: rgba(255, 255, 255, 1) !important;
12 border: 1px solid rgba(196, 196, 196, 1) !important;
13 border-radius: 2px;
14 box-decoration-break: clone;
15 -webkit-box-decoration-break: clone;
16 color: rgba(68, 68, 68, 1) !important;
17 display: inline;
18 font-family: Consolas, "Courier New", monospace;
19 font-style: normal;
20 font-weight: normal;
21 margin: 0 2px;
22 overflow: auto;
23 padding: 0 4px;
24 text-decoration: none;
25 vertical-align: middle;
26 word-break: break-all;
27 word-wrap: break-word;
28
29 @include screen-sm-down {
30 /* Reduce the padding to prevent pixel rounding errors in the font rendering that
31 can cause the page to display a horizontal scrollbar when <kbd> appears at the
32 edge of the content container. */
33 padding: 0 3px;
34 }
35 }
36
37 @supports (-webkit-overflow-scrolling: touch) {
38 .inlineCode,
39 kbd {
40 -webkit-box-decoration-break: initial;
41 }
42 }
43
44 /* This pseudo element will cause a trailing caret to be displayed inside the element, right after
45 the last character in the `<kbd>`. Without it, browsers may render the caret either on top or
46 slightly after the right border. */
47 .redactor-layer kbd::after {
48 content: " ";
49 display: inline-block;
50 pointer-events: none;
51 }
52
53 /* Similar to the `::after` pseudo element above, but also features an absolute positioning. This
54 has no impact on the visual appearance, but avoids the caret being displayed shifted to the bottom. */
55 .redactor-layer kbd::before {
56 content: " ";
57 display: inline-block;
58 pointer-events: none;
59 position: absolute;
60 }