Inline css code not working

When I apply an inline css code to an svg as stated in the documentation it gets overridden.

for example :

theme()->getSvgIcon("demo1/media/icons/duotune/finance/fin010.svg", "svg-icon-success svg-icon-2 svg-icon-success"),

That gets called but overwritten by the theme itself.

Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (9)

I even tried twice and it still doesnt work. I need to add the !important property but then my inline is pointless. or calling the color bootstrap presets.

Hi,

Do you mean adding a custom class?

Regards

Hey, no I mean I used svg-icon-success and it didn’t work because it was overridden by the default color set with the demo.

Hi Kenneth,

I don't know what version you are using ,but maybe the page-speed package is the issue for you.

The package comes with an inlineCSS middleware that can sometimes cause issues. I recommend commenting out \RenatoMarinho\LaravelPageSpeed\Middleware\InlineCss::class, in app/http/kernel.php if it exist.

using latest version 8.0.38

Inline css is working. What is not working is that it is not DOMINATING OVER the template rules.

Here is the link to explain what im saying.

https://drive.google.com/file/d/1pAuyJLiB99P18-JitLGyAO6BUFXa3Vxe/view?usp=sharing

Hi Kenneth,

It seems the class didn't work in the HTML version as well.

image

We will check it and provide you a workaround if any.

Thanks

Hi Kenneth,

It seems there is some issue with the core Metronic SASS. We have noted this issue. We will check and fix it.

Thanks

Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(