Giter VIP home page Giter VIP logo

Comments (2)

jonschr avatar jonschr commented on July 17, 2024 3

So, my use case is that on many of my sites I'm building using atomic blocks for some basic layout elements – so if the final block within .entry-content is a full-width ab-container, then I'll want .entry-content to have no margin on the bottom. However, if the last child is a paragraph or list or image, then I'll want a default margin to apply.

The :last classes actually don't apply very consistently here regardless. For example, when logged into the site, the edit page/post link is actually the last element, but when logged out, the final block is the last element. There are other situations that can crop up as well, where (for example) I've seen that sometimes comments with trackback information are injected after the last element of the .entry-content area, which I believe can affect usage of the :last pseudoelements (not sure where that's coming from, but you can see an example if you inspect this blog post: https://elod.in/contextual-styling-in-the-gutenberg-editor/)

The styling would be done more cleanly if a body class let me target the .entry-content directly.

That make sense?

from genesis-sample.

jb510 avatar jb510 commented on July 17, 2024

Im curious why :first and :last pseudo classes aren’t sufficient for this?

from genesis-sample.

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.