Code Monkey home page Code Monkey logo

Comments (4)

joezimjs avatar joezimjs commented on May 17, 2024 1

Maybe allow people to use <ile-root> directly as a component in their templates and let them specify attributes directly on it, and then when compiling, if you see the ile-root component in there, just skip adding it.

Maybe?

from iles.

ElMassimo avatar ElMassimo commented on May 17, 2024 1

After considering the usages in existing sites, and assessing the trade-offs in implementation complexity, I decided to try the following approach.

The current behavior will be to apply the class attribute to the ile-root wrapper.
The inner component will still receive that class, and can choose to ignore it or apply it, as with any other prop.

from iles.

ElMassimo avatar ElMassimo commented on May 17, 2024

Marking it as an enhancement because .parent > * is a simple workaround for styling.


Would like to get some proposals for how to differentiate attributes for the wrapper and the inner component.

I'm leaning towards reserving the ile- prefix, as in ile-class and ile-style, which would be applied in the ile-root element:

<div class="parent">
  <MyComponent client:load ile-class="child" class="grandchild">
</div>

would result in:

<div class="parent">
  <ile-root id="ile-1" class="child">
    <div class="grandchild">Hello World!</div>
  </ile-root>
</div>

from iles.

davidlueder avatar davidlueder commented on May 17, 2024

It seems that adding class="abcd" works during development (iles dev --open) but not after generation of the static page (iles build && iles preview --open). I would really like to use this :)

from iles.

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.