question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Custom CSS gets overwritten

See original GitHub issue

I’m using the plugin as such:

new CarteBlanche({
    componentRoot: './src/Components',
    files: [
        path.resolve('dist/client.css'),
    ],
}),

When I look at /dist/carte-blanche/index.html I do see the <style> tags with my CSS in it, in this case a basic Bootstrap:

.form-control {
  display: block;
  width: 100%;
  height: 34px;
  padding: 6px 12px;
  font-size: 14px;
  line-height: 1.42857;
  // ...

However when I actually go into Carte Blanche and look at a component using those styles, they’re nowhere to be found:

screen shot 2016-06-03 at 15 28 27

Inspecting CB’s <head> also shows a good bunch of <style> tags but none containing my CSS. Same thing for the <head> in the component’s iframe

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Anahkiasencommented, Jun 3, 2016

Ok! Using injectTags in the meantime, can confirm that solved my issue. Can close this if you want

0reactions
mxstbrcommented, Jun 3, 2016

Awesome, thanks! We’re working on it!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why is my CSS class being overwritten/ignored?
CSS Specificity is the answer (as to why your style is being overridden). An ID in the selector adds a higher specificity than...
Read more >
Custom CSS file gets overwritten · Issue #149 - GitHub
I tried to add a custom.css file as described in the documentation with: html_static_path = ['_static'] html_css_files = ['css/custom.css'] ...
Read more >
My custom CSS is overwritten by the bootstrap CSS - Laracasts
The TH style is overwritten by bootstrap to 8px, the rest is working fine. ... If yes then my custom CSS is the...
Read more >
Loading custom css overwrite scss
Hi, I am new to scss. I am using bootstrapUI. My custom.css is being overwritten by _tables.scss Is there a way to have...
Read more >
How to Override CSS Styles - W3docs
Here, the Class selector overrode the ID selector because it was the last used one. An ID selector only takes precedence over a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found