Giter Club home page Giter Club logo

Comments (6)

smileyj68 avatar smileyj68 commented on August 28, 2024

Hey Milo - this is a simple change we can make, but when you mention WP users having a height attribute do you mean one provided in default stylesheets, or one applied inline? Inline heights will override a general reset like this, but if you mean it's in a stylesheet reset we can add it to to grid.css.

from foundation-sites.

milohuang avatar milohuang commented on August 28, 2024

It's not in the default CSS. When using WP editor to insert images, it automatically add height and width attributes to the images as HTML and you won't be able to just use the current grid.css to resize the image while keeping the aspect ratio. But when I add the img { height: auto; }, it works well. Not sure if I answered your question.

from foundation-sites.

smileyj68 avatar smileyj68 commented on August 28, 2024

That's odd - if WP is applying an inline height in pixels, height:auto should be getting overriden. Maybe WP is doing something fancy to avoid that? At any rate, added a height:auto attribute to grid.css for images, embeds and objects so that should take care of that. 69c6ccc

from foundation-sites.

lukeholder avatar lukeholder commented on August 28, 2024

I am getting this issue outside of wordpress.
An image that has a height and width attribute is being overridden by foundation which does not make sense given inline attributes should prevail?

screenshot

from foundation-sites.

cyberdude avatar cyberdude commented on August 28, 2024

Same here with @lukeholder this is messing my images. I think this is a Wordpress CMS issue.

from foundation-sites.

filipegiusti avatar filipegiusti commented on August 28, 2024

It breaks the right display of images before they get loaded when you set height in the image tag. Also breaks any library that depends on the image height set directly in the image tag.

An example is that I'm using packery and setting the width and height, but as the height gets overwriting, it fails to position the images properly before they get loaded.

I think this is too intrusive and should be reverted.

from foundation-sites.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.