sass / sass-site

Sass Website
https://sass-lang.com
Other
321 stars 233 forks source link

Fix CodeMirror style loading bug #1232

Closed jamesnw closed 1 month ago

jamesnw commented 1 month ago

In some instances, the CodeMirror styles were being added incorrectly, leading to the code editor not being laid out or styled.

image

The bug appeared to be triggered by a race condition- if the SplitView web component loaded before CodeMirror, CodeMirror would attach styles to the SplitView's shadow root instead of the host Document. This explicitly sets the host Document as the place where styles should be attached.

netlify[bot] commented 1 month ago

Deploy Preview for sass-lang ready!

Name Link
Latest commit 51ee4387c9e42b209efe74bbaad2a82f5b99a5a7
Latest deploy log https://app.netlify.com/sites/sass-lang/deploys/671c00e934941e00084a5383
Deploy Preview https://deploy-preview-1232--sass-lang.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.