Git Product home page Git Product logo

Comments (12)

GlenDC avatar GlenDC commented on July 1, 2024

Exactly what i need for a major update on flex-html. As it's such a small module, it should hopefully not take too long to review & publish it :) Looks good to me, great job 👍

from package.elm-lang.org.

evancz avatar evancz commented on July 1, 2024

This line should be this:

return elm.Native.Vendor.values = { prefix: vendorPrefix };

This makes it so the whole module does not get evaluated tons of times, that's why the prelude checking for .values is needed.

from package.elm-lang.org.

evancz avatar evancz commented on July 1, 2024

Also, to set expectations, this will not be the recommended way of doing things in the future. For the sake of making the CSS stuff work, I think it is worth it to make an exception here, but in the next months I think we well need to redo a bunch of the native modules out there. Are you okay with doing this work at some point in the future?

from package.elm-lang.org.

GlenDC avatar GlenDC commented on July 1, 2024

@evancz, are there plans to make it possible to have external CSS code published along modules? Or how would the recommended way solve modules that require heavily on CSS features?

I'm ok to help out @coreytrampe for stuff like this btw, if he needs a helping maintaining hand :)

from package.elm-lang.org.

evancz avatar evancz commented on July 1, 2024

Right now folks just distribute CSS alongside the generated Elm. Put a class in the Elm code. I don't have anything fancier than that planned, and I have a feeling the community can come up with better things than me on this question.

from package.elm-lang.org.

 avatar commented on July 1, 2024

Ok, fixed that. Thanks, Evan.

I'll be happy to update when the time comes.

from package.elm-lang.org.

evancz avatar evancz commented on July 1, 2024

Did you edit it based on an email notification? I edited the code snippet, I got it wrong at first. It needs to have the .values part.

I looked at docs a bit. Does it make sense to return a string? If so, what are all the possible strings? How should I find it out? Should they all be listed in the docs? Would it make sense to represent it as a union type?

type Vendor = Moz | Webkit | MS | Opera

That way there is no unexpected case for anyone. You can decide for yourself what is the right tradeoff, but I just want to make sure to ask :)

from package.elm-lang.org.

 avatar commented on July 1, 2024

Lol, yeah. Glad you noticed.

That seems like a good idea. The usage example becomes:

import Vendor

displayValue : String
displayValue =
    if Vendor.prefix == Vendor.Webkit
    then "-webkit-flex"
    else "flex"

Same code, but with a much stronger contract. Dig it.

from package.elm-lang.org.

evancz avatar evancz commented on July 1, 2024

LMK when it's updated

from package.elm-lang.org.

 avatar commented on July 1, 2024

Alright, whenever you have the chance, buddy.
Sorry about the churn!

from package.elm-lang.org.

GlenDC avatar GlenDC commented on July 1, 2024

I quite like this, thanks for the work @coreytrampe 👍

from package.elm-lang.org.

evancz avatar evancz commented on July 1, 2024

Okay, should be publishable! Thanks for going through the review process!

from package.elm-lang.org.

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.