Skip to content
This repository was archived by the owner on Jan 15, 2019. It is now read-only.

Include non-breaking space override on the front end#670

Merged
allancole merged 1 commit intomasterfrom
update/add-nbsp-override-to-front-end-again
Nov 28, 2018
Merged

Include non-breaking space override on the front end#670
allancole merged 1 commit intomasterfrom
update/add-nbsp-override-to-front-end-again

Conversation

@kjellr
Copy link
Copy Markdown
Collaborator

@kjellr kjellr commented Nov 26, 2018

Fixes #657. This is a re-implementation of #585, and reverts the change made in 14d240a.

Before:

screen shot 2018-11-26 at 9 25 17 am

After:

screen shot 2018-11-26 at 9 25 55 am

Chrome 70.0.3538.110 on MacOS 10.14.1, using sample paragraph block content from the site in the original ticket:

<p>Our fellow meetup member <a href="https://marcwieland.name">Marc Wieland</a>&nbsp;has been portrayed by <a href="https://www.rtr.ch/">Romansh Television (RTR)</a>&nbsp;about smart ways of working in the digital age.</p>

@kjellr kjellr added the bug Something isn't working label Nov 26, 2018
@jasmussen
Copy link
Copy Markdown
Collaborator

This seems good to me but I don't have time to test. 👍 👍

*/
@font-face {
font-family: 'NonBreakingSpaceOverride';
src: url(data:application/font-woff2;charset=utf-8;base64,d09GMgABAAAAAAMoAA0AAAAACDQAAALTAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP0ZGVE0cGh4GYACCahEICjx3CywAATYCJANUBCAFhiEHgWwbXQfILgpsY+rQRRARwyAs6uL7pxzYhxEE+32b3aeHmifR6tklkS9hiZA0ewkqGRJE+H7/+6378ASViK/PGeavqJyOzsceKi1s3BCiQsiOdn1r/RBgIJYEgCUhbm/8/8/h4saPssnTNkkiWUBrTRtjmQSajw3Ui3pZ3LYDPD+XG2C3JA/yKAS8/rU5eNfuGqRf4eNNgV4YAlIIgxglEkWe6FYpq10+wi3g+/nUgvgPFczNrz/RsTgVm/zfbPuHZlsuQECxuyqBcQwKFBjFgKO8AqP4bAN9tFJtnM9xPcbNjeXS/x1wY/xU52f5W/X1+9cnH4YwKIaoRRAkUkj/YlAAeF/624foiIDBgBmgQBeGAyhBljUPZUm/l2dTvmpqcBDUOHdbPZWd8JsBAsGr4w8/EDn82/bUPx4eh0YNrQTBuHO2FjQEAGBwK0DeI37DpQVqdERS4gZBhpeUhWCfLFz7J99aEBgsJCHvUGAdAPp4IADDCAPCEFMGpMZ9AQpTfQtQGhLbGVBZFV8BaqNyP68oTZgHNj3M8kBPfXTTC9t90UuzYhy9ciH0grVlOcqyCytisvbsERsEYztiznR0WCrmTksJwbSNK6fd1Rvr25I9oLvctUoEbNOmXJbqgYgPXEHJ82IUsrCnpkxh23F1rfZ2zcRnJYoXtauB3VTFkFXQg3uoZYD5qE0kdjDtoDoF1h2bulGmev5HbYhbrjtohQSRI4aNOkffIcT+d3v6atpaYh3JvPoQsztCcqvaBkppDSPcQ3bw3KaCBo1f5CJWTZEgW3LjLofYg51MaVezrx8xZitYbQ9KYeoRaqQdVLwSEfrKXLK1otCWOKNdR/YwYAfon5Yk8O2MJfSD10dPGA5PIJJQMkah0ugMJiv6x4Dm7LEa8xnrRGGGLAg4sAlbsA07sAt76DOsXKO3hIjtIlpnnFrt1qW4kh6NhS83P/6HB/fl1SMAAA==) format('woff2'),
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My only hang up about this fix is that it’s a really large chunk of CSS to fix just this one character. Instead, wouldn’t the fix proposed at the following link get this done in a more performant way? WordPress/gutenberg#11405 (comment)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's what we implemented originally over in #463, but it introduced an error with descenders:
#463 (comment)

Granted, this wouldn't be an issue in the front end, but for consistency's sake I think it makes sense to use the same fix in both places.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahhh, I see. Yeah I hadn’t realized this negatively effected the frontend as well.

I’m a bit torn on this one. If we keep consistency, we’re left with a larger CSS file than we really need. If we break consistency, we’d probably have to refactor the font variables in Sass to adapt for front-end and back-end which wouldn’t be pretty. Since this only a problem for the “Hoefler Text” font and we wouldn’t want other theme authors to get confused around this hack, I think the consistency route edges out the win for me.

*/
@font-face {
font-family: 'NonBreakingSpaceOverride';
src: url(data:application/font-woff2;charset=utf-8;base64,d09GMgABAAAAAAMoAA0AAAAACDQAAALTAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP0ZGVE0cGh4GYACCahEICjx3CywAATYCJANUBCAFhiEHgWwbXQfILgpsY+rQRRARwyAs6uL7pxzYhxEE+32b3aeHmifR6tklkS9hiZA0ewkqGRJE+H7/+6378ASViK/PGeavqJyOzsceKi1s3BCiQsiOdn1r/RBgIJYEgCUhbm/8/8/h4saPssnTNkkiWUBrTRtjmQSajw3Ui3pZ3LYDPD+XG2C3JA/yKAS8/rU5eNfuGqRf4eNNgV4YAlIIgxglEkWe6FYpq10+wi3g+/nUgvgPFczNrz/RsTgVm/zfbPuHZlsuQECxuyqBcQwKFBjFgKO8AqP4bAN9tFJtnM9xPcbNjeXS/x1wY/xU52f5W/X1+9cnH4YwKIaoRRAkUkj/YlAAeF/624foiIDBgBmgQBeGAyhBljUPZUm/l2dTvmpqcBDUOHdbPZWd8JsBAsGr4w8/EDn82/bUPx4eh0YNrQTBuHO2FjQEAGBwK0DeI37DpQVqdERS4gZBhpeUhWCfLFz7J99aEBgsJCHvUGAdAPp4IADDCAPCEFMGpMZ9AQpTfQtQGhLbGVBZFV8BaqNyP68oTZgHNj3M8kBPfXTTC9t90UuzYhy9ciH0grVlOcqyCytisvbsERsEYztiznR0WCrmTksJwbSNK6fd1Rvr25I9oLvctUoEbNOmXJbqgYgPXEHJ82IUsrCnpkxh23F1rfZ2zcRnJYoXtauB3VTFkFXQg3uoZYD5qE0kdjDtoDoF1h2bulGmev5HbYhbrjtohQSRI4aNOkffIcT+d3v6atpaYh3JvPoQsztCcqvaBkppDSPcQ3bw3KaCBo1f5CJWTZEgW3LjLofYg51MaVezrx8xZitYbQ9KYeoRaqQdVLwSEfrKXLK1otCWOKNdR/YwYAfon5Yk8O2MJfSD10dPGA5PIJJQMkah0ugMJiv6x4Dm7LEa8xnrRGGGLAg4sAlbsA07sAt76DOsXKO3hIjtIlpnnFrt1qW4kh6NhS83P/6HB/fl1SMAAA==) format('woff2'),
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahhh, I see. Yeah I hadn’t realized this negatively effected the frontend as well.

I’m a bit torn on this one. If we keep consistency, we’re left with a larger CSS file than we really need. If we break consistency, we’d probably have to refactor the font variables in Sass to adapt for front-end and back-end which wouldn’t be pretty. Since this only a problem for the “Hoefler Text” font and we wouldn’t want other theme authors to get confused around this hack, I think the consistency route edges out the win for me.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants