| 1 |
/*! |
| 2 |
* VisualEditor ContentEditable BranchNode styles. |
| 3 |
* |
| 4 |
* @copyright See AUTHORS.txt |
| 5 |
*/ |
| 6 |
|
| 7 |
.ve-ce-branchNode { |
| 8 |
&:focus { |
| 9 |
/* Prevent focus outline on editable sections */ |
| 10 |
outline: 0; |
| 11 |
} |
| 12 |
|
| 13 |
&-blockSlug { |
| 14 |
opacity: 0; |
| 15 |
cursor: pointer; |
| 16 |
transition: opacity 200ms ease-out; |
| 17 |
/* Create a block formatting context to avoid overlapping floated elements (T211844) */ |
| 18 |
overflow: hidden; |
| 19 |
|
| 20 |
.ve-ce-surface-readOnly &, |
| 21 |
.ve-ce-surface-dragging & { |
| 22 |
visibility: hidden; |
| 23 |
} |
| 24 |
|
| 25 |
&:hover, |
| 26 |
&.ve-ce-branchNode-blockSlug-focused { |
| 27 |
opacity: 1; |
| 28 |
} |
| 29 |
|
| 30 |
> .oo-ui-buttonWidget { |
| 31 |
opacity: 0.5; |
| 32 |
display: block; |
| 33 |
|
| 34 |
> .oo-ui-buttonElement-button { |
| 35 |
display: block; |
| 36 |
|
| 37 |
.ve-ce-surface-dragging & { |
| 38 |
/* -moz-user-select:none is applied in OOUI, but causes FF to create multi-range selections (T214976) */ |
| 39 |
-moz-user-select: text; |
| 40 |
} |
| 41 |
} |
| 42 |
} |
| 43 |
|
| 44 |
> .oo-ui-buttonElement-frameless.oo-ui-iconElement:first-child { |
| 45 |
/* We add a border, so cancel weird margin adjustment meant for frameless buttons */ |
| 46 |
margin-left: 0; |
| 47 |
} |
| 48 |
|
| 49 |
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */ |
| 50 |
.oo-ui-labelElement-label::selection { |
| 51 |
/* Don't draw selection highlight inside block slug after selecting across it */ |
| 52 |
background: transparent; |
| 53 |
} |
| 54 |
} |
| 55 |
|
| 56 |
/* stylelint-disable-next-line no-descending-specificity */ |
| 57 |
&-blockSlug, |
| 58 |
/* Increased specificity to override possible skin styles */ |
| 59 |
html body p&-newSlug { |
| 60 |
margin: -0.3em 0 -0.1em 0; |
| 61 |
outline: 1px dashed #c8ccd1; |
| 62 |
background-color: fade( #f1f7fb, 75% ); |
| 63 |
} |
| 64 |
|
| 65 |
&-newSlug { |
| 66 |
&-open { |
| 67 |
background-color: transparent; |
| 68 |
outline-color: transparent; |
| 69 |
outline-offset: 1em; |
| 70 |
transition: all 400ms ease-out; |
| 71 |
} |
| 72 |
} |
| 73 |
|
| 74 |
pre& { |
| 75 |
/* Pre-formatted node styling */ |
| 76 |
/* Support: Chrome, Safari */ |
| 77 |
/* Prevent silly wrapping on Safari and Chrome (https://bugs.webkit.org/show_bug.cgi?id=35935) */ |
| 78 |
word-wrap: normal; |
| 79 |
} |
| 80 |
} |
| 81 |
|
| 82 |
.ve-ce-chimera { |
| 83 |
width: 0; |
| 84 |
height: 0; |
| 85 |
|
| 86 |
&-webkit { |
| 87 |
/* Cursor positioning tweak */ |
| 88 |
/* |
| 89 |
* Leaving width at 0 causes a small horizontal wobble, but using a |
| 90 |
* non-zero value can cause it to be visible on high-DPI devices (T218331) |
| 91 |
*/ |
| 92 |
height: 1em; |
| 93 |
} |
| 94 |
|
| 95 |
&-gecko { |
| 96 |
/* Force height in empty branch */ |
| 97 |
border: 1px solid transparent; |
| 98 |
/* Avoid interaction with absolutely positioned overlays like CodeMirror (T198278) */ |
| 99 |
margin-right: -2px; |
| 100 |
} |
| 101 |
|
| 102 |
&-debug { |
| 103 |
vertical-align: middle; |
| 104 |
width: auto; |
| 105 |
height: auto; |
| 106 |
} |
| 107 |
} |
| 108 |
|
| 109 |
.ve-ce-unicorn:not( .ve-ce-unicorn-debug ) { |
| 110 |
width: 0; |
| 111 |
height: 0; |
| 112 |
} |