Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes
The broken Algolia styles were because of some unnecessary astro scoping in the Algolia styles. I fixed this by adding
is:global
.The problem was the unnecessary astro scoping
I am not sure why didn't this "missing styles" issue happen in the dev version. I suspect it has something to do with the bug in astro where importing styles into a layer also duplicates those styles outside the layer (as mentioned in #1365 (comment)).
But what I'm confused about is why when running
yarn dev
before this PR shows this order of styles/stylesheets in the browser inspect pane:body
in no layer:root
in no layer:root
in thethirdparty.algolia
layeri.e., what surprises me is that even though
body
has a lower specificity ((0, 0, 1)
) than:root
((0, 1, 0)
),body
's styles get preference over:root
.screenshots
Regardless, making sure the Algolia styles are global solves the styling issue in the
prod
anddev
builds. So this PR is good as-is.Testing
Ran
yarn build
andyarn preview
in thewebsite
workspace to confirm that the styles show up correctly in the production build.Docs
N/A