You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CSS offers a way to group different font-faces of a certain font-family under a global name (like google fonts does it) and then determines the font-face by using font-weight or font-style:
@font-face {
font-family:'Roboto'; // group name
font-style: normal;
font-weight:900;
src:local('Roboto Black'),local('Roboto-Black'),url(https://domain.tld/assets/Roboto-Black.woff2) format('woff2');
}
@font-face {
font-family:'Roboto'; // group name
font-style: normal;
font-weight:400;
src:local('Roboto'),local('Roboto-Regular'),url(https://https://domain.tld/assets/Roboto-Regular.woff2) format('woff2');
}
// uses Roboto-Regular
body {
font-family:'Roboto';
}
// uses Roboto-Black
h1 {
font-weight:900;
}
The background of my request is that currently you have to pick one font-face ie. 'Roboto-Regular' as a default global font for your website, but than tags like strong/b or i/em are displayed with Regular font-face and not with their default bold or respectively italic weight/style...
The text was updated successfully, but these errors were encountered:
MarcelloDiSimone
changed the title
Is it possible to have a global font-face name
Is it possible to have a font-face group name
Apr 21, 2020
MarcelloDiSimone
changed the title
Is it possible to have a font-face group name
Support font-face name grouping
Apr 21, 2020
In addition to that, this would open up the possibility to extract variables and mixins that would be much more flexible in styling font related things:
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
CSS offers a way to group different font-faces of a certain font-family under a global name (like google fonts does it) and then determines the font-face by using font-weight or font-style:
A possible syntax could look like following:
The background of my request is that currently you have to pick one font-face ie. 'Roboto-Regular' as a default global font for your website, but than tags like
strong
/b
ori
/em
are displayed with Regular font-face and not with their default bold or respectively italic weight/style...The text was updated successfully, but these errors were encountered: