Skip to content

Commit 8ab786f

Browse files
Add CSS and make it similar to invisible spaces
1 parent 76fb698 commit 8ab786f

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

assets/css/style.css

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1285,9 +1285,18 @@ form.filters-toolbar a.revealing.open {
12851285
margin-left: 2px;
12861286
}
12871287

1288-
.invisible-spaces {
1289-
background-color: var( --gp-color-secondary-600 );
1290-
opacity: 0.4;
1288+
.invisible-spaces,
1289+
.notranslate.placeholder {
1290+
background-color: var( --gp-color-neutral-muted );
1291+
display: inline-block;
1292+
line-height: 1em;
1293+
padding: 0.125em;
1294+
border-radius: 0.125em;
1295+
border: 1px solid var( --gp-color-border-default );
1296+
}
1297+
1298+
.notranslate.placeholder {
1299+
font-family: monospace;
12911300
}
12921301

12931302
.ternary {

gp-templates/helper-functions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ function( $m ) use ( &$glossary_entries ) {
3232
// Break out & back into notranslate for translatable attributes.
3333
$text = preg_replace( '/(title|aria-label)=([\'"])([^\\2]+?)\\2/', '\\1=\\2</span>\\3<span class="notranslate">\\2', $text );
3434
// Wrap placeholders with notranslate.
35-
$text = preg_replace( '/(%(\d+\$(?:\d+)?)?[bcdefglosuxEFGX])/', '<span class="notranslate">\\1</span>', $text );
35+
$text = preg_replace( '/(%(\d+\$(?:\d+)?)?[bcdefglosuxEFGX])/', '<span class="notranslate placeholder">\\1</span>', $text );
3636

3737
// Put the glossaries back!
3838
$text = preg_replace_callback(

0 commit comments

Comments
 (0)