Skip to content

Inline more styles into extracted partials#8178

Merged
javierjulio merged 12 commits into
masterfrom
template-updates
Dec 15, 2023
Merged

Inline more styles into extracted partials#8178
javierjulio merged 12 commits into
masterfrom
template-updates

Conversation

@javierjulio

@javierjulio javierjulio commented Dec 15, 2023

Copy link
Copy Markdown
Member

Now that we've extracted the initial set of customizable templates, we can inline more Tailwind styles in those templates for users to customize without having to change CSS. Some styles will have to remain as components. In the future, it would be nice to extract more partials, for example, a default for comments or other components. This also includes some bug fixes for the dark mode toggle JS.

With the extract template we can now inline the grid layout styles and use an explicit named class for setting a link default style in content area, this way it can also be easily removed if not desired.
Remove commented template

Remove unused font size base variables
@javierjulio javierjulio self-assigned this Dec 15, 2023
@codecov

codecov Bot commented Dec 15, 2023

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (07b72b4) 99.01% compared to head (4df5424) 99.01%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #8178   +/-   ##
=======================================
  Coverage   99.01%   99.01%           
=======================================
  Files         152      152           
  Lines        4243     4243           
=======================================
  Hits         4201     4201           
  Misses         42       42           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Apply link default style component to links partial to retain previous styling that was removed.
These elements won't exist, although they could, we still need to protect against the fact they may not be there. We can use JS optional chaining operator here.
If the system preference was used and it happen to be light mode and the user had not used this switch, then when toggling for the first time nothing would change because it would set the theme key to light mode when it already was. This updates the logic to match what we do when setting the theme so it has the correct, expected behavior.
This is the default already which is what we want to use.
@javierjulio javierjulio merged commit 00851ec into master Dec 15, 2023
@javierjulio javierjulio deleted the template-updates branch December 15, 2023 20:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant