grav icon indicating copy to clipboard operation
grav copied to clipboard

style is ignored in html stuff like <div> or <img>

Open Askelhardd opened this issue 1 month ago • 5 comments

I was using 1.8 beta 1x and upgraded to beta 25, and now I am supposed to make a css class in custom.css for every single tiny change I want to make ?

<div>
    <img src="user/pages/01.blog/my_article/1.jpg" style="width:2000%;">
</div>

This doesn't work

Is this a bug or just mental retardation ?

Askelhardd avatar Nov 23 '25 18:11 Askelhardd

The theme's CSS is not really controlled by Grav itself, the themes are really independent of Grav (other than potentially some twig stuff), so is your theme CSS not loading at all? what theme are you using? can you inspect the page and see if the CSS is loaded there?

They only thing i can think of that might cause an issue, is i did make changes to the deferred block logic in twig. I tested this and seemed to work without issues in my test sites though. I would need more details to know what you are referring to exactly. Perhaps a URL i can look at?

rhukster avatar Nov 23 '25 18:11 rhukster

The theme's CSS is not really controlled by Grav itself, the themes are really independent of Grav (other than potentially some twig stuff), so is your theme CSS not loading at all? what theme are you using? can you inspect the page and see if the CSS is loaded there?

They only thing i can think of that might cause an issue, is i did make changes to the deferred block logic in twig. I tested this and seemed to work without issues in my test sites though. I would need more details to know what you are referring to exactly. Perhaps a URL i can look at?

I mean my theme is a slightly modified sora article. It works fine.

It's when I add the div above with style="" in my markdown, that style is not doing anything. while assigning a class and with css stuff for it in custom.css work fine too

I saw a setting like "disable inline html styling" or something in the admin panel, but doesn't seem to fix that

Askelhardd avatar Nov 24 '25 13:11 Askelhardd

Nothing to do with Grav if you have HTML that's not rendering a style, you just need to inspect with your browser and see what's going on.

rhukster avatar Nov 24 '25 21:11 rhukster

Nothing to do with Grav if you have HTML that's not rendering a style, you just need to inspect with your browser and see what's going on.

It was working fine until I updated grav. it's the markdown parser being broken, or something about "security" disabling inline style

I went from beta 1x to beta 25, updated to php 8.3, that's it.

Askelhardd avatar Nov 26 '25 13:11 Askelhardd

URL? screenshot? i need more info

rhukster avatar Nov 26 '25 13:11 rhukster