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

Custom Styling with Plain CSS #42

Open
brian-t-allen opened this issue Apr 7, 2020 · 0 comments
Open

Custom Styling with Plain CSS #42

brian-t-allen opened this issue Apr 7, 2020 · 0 comments

Comments

@brian-t-allen
Copy link

I'm trying to style the overlay and spinner using plain CSS (to reduce the amount of code as LoadingOverlay is used throughout the app) .

Here is my CSS:
._loading_overlay_overlay {
background: rgba(0, 0, 0, 0.2) !important;
border-radius: 10px !important;
}
._loading_overlay_spinner {
width: 100px !important;
}
._loading_overlay_spinner svg circle: {
stroke: rgba(0, 135, 196, 0.8) !important;
}

The first two work, because they're operating directly on an element with a specified class.

The third one, to modify the stroke on the SVG circle, doesn't work. I can get it to work using the style={{}} syntax and '& svg circle', but that involves duplicating the code repeatedly.

Can class selectors be added to the SVG and circle elements so they can be styled directly? It seems like the selector '._loading_overlay_spinner svg circle' or '._loading_overlay_spinner::before svg circle' or '._loading_overlay_spinner > svg > circle' should work, but they don't.

Thanks!

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

No branches or pull requests

1 participant