Layout styles
See original GitHub issueIs there a way to stop the component inserting inline css with the image?
I’m using this to load a bg image, the layout=fill
has worked, just wanted to clean it up a bit.
Something like layout="none"
maybe?
Issue Analytics
- State:
- Created 2 years ago
- Comments:10 (10 by maintainers)
Top Results From Across the Web
Layout designs, themes, templates and downloadable ...
Layout. 71,448 inspirational designs, illustrations, and graphic elements from the world's best designers. Want more inspiration? Browse our search results.
Read more >Layout mode - CSS: Cascading Style Sheets - MDN Web Docs
A CSS layout mode, sometimes called layout, is an algorithm that determines the position and size of boxes based on the way they...
Read more >Layout patterns - web.dev
A collection of layout patterns built using modern CSS APIs that will help you build common interfaces such as cards, dynamic grid areas,...
Read more >Layout and Styles - Build Beautiful Forms
Edit form styles. Create two column forms. Multi column forms. Easily adjust form layout. You don't need a designer, just Layout and Styles!...
Read more >The Basics of Page Layout Design (+25 ...
Truth is, I didn't understand page layout design or how to put together a webpage that conveyed my intended message and was visually...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m also struggling a little bit here, due to the
display: inline-block;
being set inline on theImg
component. I want to center the image, and I’m trying to use a css class to setdisplay: block; margin: 0 auto;
, but the inline styles are winning out. I can add it as astyle
inattributes.img
, but that just feels like escalating the specificity wars, and doesn’t feel very scalable.That said, adding more options to what are already a huge set of options, feels a bit wrong. I wonder if it would be possible to use normal css classes to do the internal astro-imagetools styling, rather than inline styles, which would at least make it possible to easily override the styles while keeping a default behavior.
I’m just inserting the image component with absolute positioning and object-fit behind my content. [Github link] [Live Link]
I was a bit surprised after inserting the image that it didnt keep its full page proportions (hadnt seen the inline style yet). The
fill
essentially worked the same, just had it all done before on css.