Skip to content

Update templates to use scoped CSS #35658

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

Merged
merged 2 commits into from
Aug 31, 2021
Merged

Conversation

captainsafia
Copy link
Member

@captainsafia captainsafia commented Aug 24, 2021

Address #31030

@ghost ghost added the area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates label Aug 24, 2021
@captainsafia captainsafia marked this pull request as ready for review August 25, 2021 03:37
@captainsafia captainsafia requested a review from Pilchie as a code owner August 25, 2021 03:37
@captainsafia captainsafia requested review from javiercn and a team August 25, 2021 03:37
"Pages/Shared/_LoginPartial.cshtml",
"Pages/Shared/_ValidationScriptsPartial.cshtml",
"Properties/launchSettings.json",
"wwwroot/favicon.ico",
"wwwroot/css/site.css",
Copy link
Member Author

@captainsafia captainsafia Aug 25, 2021

Choose a reason for hiding this comment

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

Do we want to keep a stub site.css file in the template or should we completely move over? We can probably keep the html and @media related styles in the site.css file but not sure how all-or-nothing we wanted to be about the migration.

Copy link
Member

Choose a reason for hiding this comment

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

I think we should keep it, it gives folks a place to put regular/global CSS.

Copy link
Contributor

Choose a reason for hiding this comment

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

We generally don't ship empty files though. Particularly not one that isn't referenced by the app. Let's remove this, users can always add one back if they want to.

Copy link
Member Author

Choose a reason for hiding this comment

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

We generally don't ship empty files though.

They won't be empty in this case. I just moved the top-level styles targeting html and body to them. I think that's a good middle-ground.

"Pages/Shared/_LoginPartial.cshtml",
"Pages/Shared/_ValidationScriptsPartial.cshtml",
"Properties/launchSettings.json",
"wwwroot/favicon.ico",
"wwwroot/css/site.css",
Copy link
Contributor

Choose a reason for hiding this comment

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

We generally don't ship empty files though. Particularly not one that isn't referenced by the app. Let's remove this, users can always add one back if they want to.

@captainsafia captainsafia requested a review from a team August 31, 2021 20:35
@pranavkm
Copy link
Contributor

@captainsafia do we plan on merging this in to main too?

@captainsafia
Copy link
Member Author

@pranavkm Yep.

@captainsafia
Copy link
Member Author

@dotnet/aspnet-build Can I get help merging?

@TanayParikh TanayParikh merged commit 8795e2f into release/6.0 Aug 31, 2021
@TanayParikh TanayParikh deleted the safia/css-templates branch August 31, 2021 21:42
@ghost ghost added this to the 6.0-rc2 milestone Aug 31, 2021
captainsafia added a commit that referenced this pull request Sep 1, 2021
* Update templates to use scoped CSS

* Move html and body styles to static CSS file
captainsafia added a commit that referenced this pull request Sep 7, 2021
* Update templates to use scoped CSS

* Move html and body styles to static CSS file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants