Merge branch '3.0'
[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
30 @supports (-webkit-overflow-scrolling: touch) {
31 .inlineCode,
32 kbd {
33 -webkit-box-decoration-break: initial;
34 }
35 }
36
37 /* This pseudo element will cause a trailing caret to be displayed inside the element, right after
38 the last character in the `<kbd>`. Without it, browsers may render the caret either on top or
39 slightly after the right border. */
40 .redactor-layer kbd::after {
41 content: " ";
42 display: inline-block;
43 pointer-events: none;
44 }
45
46 /* Similar to the `::after` pseudo element above, but also features an absolute positioning. This
47 has no impact on the visual appearance, but avoids the caret being displayed shifted to the bottom. */
48 .redactor-layer kbd::before {
49 content: " ";
50 display: inline-block;
51 pointer-events: none;
52 position: absolute;
53 }