Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RFC] Global CSS #134

Closed
1 of 5 tasks
thescientist13 opened this issue Jul 31, 2019 · 1 comment
Closed
1 of 5 tasks

[RFC] Global CSS #134

thescientist13 opened this issue Jul 31, 2019 · 1 comment
Assignees
Labels
RFC Proposal and changes to workflows, architecture, APIs, etc v0.3.0
Milestone

Comments

@thescientist13
Copy link
Member

thescientist13 commented Jul 31, 2019

Type of Change

  • New Feature Request
  • Documentation / Website
  • Improvement / Suggestion
  • Bug
  • Other (please clarify below)

Summary

As part of #91 and #110 the current implementation of @importing a font is not working (never saw a network request for any CSS). It did seem to work when hardcoded right into index.html though. (Might require a PostCSS plugin for some of it?)

In addition, when removing hardcoded CSS it looked global styles weren't really global.

Details

Per @hutchgrant , the primary issue is most likely related to ShadowDOM

So we should probably do another injection step as part of our build step

  1. If a styles/theme.css file is found in the user workspace, inject that directly into the <head> of index.html in packages/cli
  2. Make that file path configurable (relative to workspace, so just_styles/main.css_ would work)
  3. Add unit tests (as part of smoke testing ideally) and config option for themePath
  4. Add API Docs for Styles and document this feature (and in Configuration too)

This is essentially a more robust version / continuation of #7

@thescientist13 thescientist13 added the enhancement Improve something existing (e.g. no docs, new APIs, etc) label Jul 31, 2019
@thescientist13 thescientist13 added this to the POC milestone Jul 31, 2019
@thescientist13 thescientist13 self-assigned this Jul 31, 2019
@thescientist13 thescientist13 changed the title As a user I would like to be have support for custom typography As a user I would like to have support for custom typography Jul 31, 2019
@thescientist13 thescientist13 changed the title As a user I would like to have support for custom typography As a user I would like to have support for global CSS (google fonts, wildcard selector) Jul 31, 2019
@thescientist13 thescientist13 changed the title As a user I would like to have support for global CSS (google fonts, wildcard selector) As a user I would like to have support for custom (@import) typography, ex. Google Fonts Jul 31, 2019
@thescientist13 thescientist13 changed the title As a user I would like to have support for custom (@import) typography, ex. Google Fonts [RFC] Global CSS Jul 31, 2019
@thescientist13 thescientist13 added RFC Proposal and changes to workflows, architecture, APIs, etc and removed enhancement Improve something existing (e.g. no docs, new APIs, etc) labels Jul 31, 2019
@thescientist13 thescientist13 removed their assignment Jul 31, 2019
@thescientist13
Copy link
Member Author

This should probably make it pretty easy!
https://github.com/webpack-contrib/mini-css-extract-plugin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RFC Proposal and changes to workflows, architecture, APIs, etc v0.3.0
Projects
None yet
Development

No branches or pull requests

1 participant