angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

Support font-inlining for global styles

Open twerske opened this issue 2 years ago • 7 comments

🚀 Feature request

Command (mark with an x)

  • [x] build

Description

Currently, font inlining only works for font that are declared in the index.html.

<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@300&display=swap" rel="stylesheet">

However, fonts can also be imported in CSS files using the @import rule.

@import url("https://fonts.googleapis.com/css2?family=Open+Sans:wght@300&display=swap");

We should probably handle both cases.

twerske avatar Apr 28 '22 19:04 twerske

Ideally we'd like to keep the font inlining as an implementation detail and hide it from developers. Can we discover all the fonts in global styles/index.html and inline them?

mgechev avatar Apr 28 '22 19:04 mgechev

We already automatically inline all the Google and Adobe fonts found in the index.html.

Not entirely sure, what is being requested here.

alan-agius4 avatar Apr 29 '22 05:04 alan-agius4

This would be the same but for fonts found in styles.css and style files.

Additionally @jelbourn and I discussed a schematic for ng add --font-inlining <font family>

twerske avatar May 03 '22 16:05 twerske

Following a convo with @twerske on Slack, this request is to enable font-inline of fonts in global stylesheets. (I have update the issue to reflect this).

Regarding @jelbourn request, I am still not sure what it being requested. I also suggest that we keep one feature per issue as it would be easier to track.

alan-agius4 avatar May 06 '22 12:05 alan-agius4

This feature request is now candidate for our backlog! In the next phase, the community has 60 days to upvote. If the request receives more than 20 upvotes, we'll move it to our consideration list.

You can find more details about the feature request process in our documentation.

angular-robot[bot] avatar May 06 '22 13:05 angular-robot[bot]

Just a heads up that we kicked off a community voting process for your feature request. There are 20 days until the voting process ends.

Find more details about Angular's feature request process in our documentation.

angular-robot[bot] avatar Jun 15 '22 13:06 angular-robot[bot]

Thank you for submitting your feature request! Looks like during the polling process it didn't collect a sufficient number of votes to move to the next stage.

We want to keep Angular rich and ergonomic and at the same time be mindful about its scope and learning journey. If you think your request could live outside Angular's scope, we'd encourage you to collaborate with the community on publishing it as an open source package.

You can find more details about the feature request process in our documentation.

angular-robot[bot] avatar Jul 04 '22 13:07 angular-robot[bot]

@twerske is this something that we still want to persue?

alan-agius4 avatar Oct 03 '23 12:10 alan-agius4

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.