Coder Social home page Coder Social logo

Comments (9)

jdegoes avatar jdegoes commented on July 22, 2024

Will you still need to define custom class names after Boostrap and other themes have been created? It's better for class names to be semantic, and fixed, rather than ad hoc and unlimited -- this way it's easier for a designer to modify the styles.

from purescript-halogen.

cryogenian avatar cryogenian commented on July 22, 2024

Classnames are not fixed because I can write classes $ className <$> ["foo", "bar"].
Maybe using it can be discouraged by name unsafeClasses in example or notTypeSafeClasses

from purescript-halogen.

jdegoes avatar jdegoes commented on July 22, 2024

The main reason to want a string constructor is to create custom class names, right? What's the difference between ClassName "foo" and "foo"? The former is more to type, but makes it easier to keep things straight with the compiler's help (e.g. accidentally passing a non-classname where a classname is expected).

from purescript-halogen.

cryogenian avatar cryogenian commented on July 22, 2024

Then className should make correctness checks and returns Maybe ClassName.
Now it just wraps string in newtype. This is neither typesafe nor comfortable.

from purescript-halogen.

jdegoes avatar jdegoes commented on July 22, 2024

Also for javascript:void(0); I assume this is to prevent the default action on a href clicks, right?

from purescript-halogen.

cryogenian avatar cryogenian commented on July 22, 2024

javascript:void(0); makes cursor pointer, and makes anchor pointing exactly this page with same hash.

from purescript-halogen.

jdegoes avatar jdegoes commented on July 22, 2024

The cursor pointer is easy to do with css: cursor: pointer. What is the benefit of a link which points to the same page with the same hash?

from purescript-halogen.

garyb avatar garyb commented on July 22, 2024

preventDefault is the "proper" way of doing that, it'll cancel the URL change.

from purescript-halogen.

cryogenian avatar cryogenian commented on July 22, 2024
  • preventDefault, tabindex, cursor:pointer, a:hover {text-decoration: underline}
  • preventDefault, href="something"
  • javascript:void(0);
  • <button class="btn btn-link"></button>

They all work same way.

from purescript-halogen.

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.