GithubHelp home page GithubHelp logo

Comments (7)

realplatanopapi avatar realplatanopapi commented on September 16, 2024

Instead of vertically aligning with flexbox, you could try aligning them by setting display: inline-block and vertical-align: middle for both elements

from pup-legacy.

brettlangdon avatar brettlangdon commented on September 16, 2024

Hmm... seems to work, but I think vertical-align: baseline lines up a little better.

Baseline

image

Middle

image

However, is this starting to get very specific to .dot?

Should we consider:

<span class="dot">
  <span class="dot__label">Blue:&nbsp;</span>
  <span class="dot__icon"></span>
</span>

Or just a more... robust .dot component?

from pup-legacy.

brettlangdon avatar brettlangdon commented on September 16, 2024

Also, baseline really only works for .dot--small just a normal dot kind of sucks and doesn't line up right... maybe we should drop .dot--small and make that the default/only size?

from pup-legacy.

brettlangdon avatar brettlangdon commented on September 16, 2024

@restlessbit what do you think about separating .inline-center and .dot. It doesn't seem like I can get exactly what I want... unless we add an .inline-baseline helper as well... which seems weird.

Does it make sense to have a component structure like I suggested with having the label be a part of .dot?

from pup-legacy.

realplatanopapi avatar realplatanopapi commented on September 16, 2024

Having a block of text with inline-center and applying that to the block looks good to me:

screen shot 2016-12-12 at 1 08 07 pm

screen shot 2016-12-12 at 1 08 11 pm

from pup-legacy.

brettlangdon avatar brettlangdon commented on September 16, 2024

idk, the dot looks too high to me.

Looking at it in this context:

Baseline

image

Middle

image

Middle just... looks off to me

from pup-legacy.

realplatanopapi avatar realplatanopapi commented on September 16, 2024

i think both are fine tbh 😺

from pup-legacy.

Related Issues (14)

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.