Code Monkey home page Code Monkey logo

Comments (4)

gekkedev avatar gekkedev commented on June 29, 2024

Can be fixed here by implementing sorting here: https://github.com/rogden/tailwind-config-viewer/blob/master/src/components/Canvas/Sections/FontSizes.vue

BTW:


If I'm not mistaken this should be a computed property, as that's a better way to obtain values. Methods serve a different purpose.

from tailwind-config-viewer.

rogden avatar rogden commented on June 29, 2024

@gekkedev Thanks for the report. Can you post the font size section of your tailwind config file? Sorting should do the trick regardless.

from tailwind-config-viewer.

gekkedev avatar gekkedev commented on June 29, 2024
fontSize: {
    "2xs": ".6875rem",
    xs: ".75rem",
    tiny: ".8125rem"
}

I managed to sort it down the problematic values: Almost anything below zero positions itself incorrectly. In the config viewer, xs is correctly ordered but after my tallest defined font size, I get 2xs and tiny:
image
The reason why text-xs is correctly positioned although it has the same value is because it was a TW-native font size I accidentally redefined 😁. So as long as a font size is both custom and below zero, it gets appended instead of ordered. The notation doesn't seem to matter, as I prefixed the dot-values with zeroes and it still positioned them at the end.
I might create a PR if I see a handy way to fix this sorting issue, but can't today.

from tailwind-config-viewer.

gekkedev avatar gekkedev commented on June 29, 2024

if (typeof rem === 'string' && rem.search('rem') === -1) {

(found no related MR where to review this) couldn't this be done via !rem.includes("rem") for the sake of readability? And possibly renaming the remVar. Or is this too new (ECMA-wise)?

from tailwind-config-viewer.

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.