Code Monkey home page Code Monkey logo

Comments (10)

elkowar avatar elkowar commented on May 10, 2024

i'm confused, what exactly are you missing there? you can already use the style property like any other property 🤔 Are you looking for a <style> tag?

from eww.

Swexti avatar Swexti commented on May 10, 2024

@elkowar He wants to mention {{vars}} in the style property.

Lemme show u:

<eww>
<definitions>
  <def name="main">
   <label text="yes this" style="color: {{color}};"/>
  </def>
  </definitions>
  <variables>
    <var name="color">#ebdbb2</var> 
  </variables>
  <windows>
    <window name="main_window" stacking="fg" focusable="false" screen="1">
    <geometry anchor="center" x="1700px" y="110px" width="350px" height="170px"/>
      <widget>
        <main/>
      </widget>
    </window>
  </windows>
</eww>

And then be able to run eww update color=#282828 to update the label text color.

from eww.

elkowar avatar elkowar commented on May 10, 2024

Is that not possible currently? 🤔 if so, thats a bug

from eww.

undefinedDarkness avatar undefinedDarkness commented on May 10, 2024

I think you can do this, might play around with it to test et

from eww.

legendofmiracles avatar legendofmiracles commented on May 10, 2024

I don't think it is, i made a var called color with the value "red", and the logs say that it got an error:

[src/eww_state.rs:34] Error while updating UI based after state change: <data>:1:22'' is not a valid color name

This is from debug:

style": AttrValue([Primitive("background-color: "), Expr(color), Primitive(";")]),

and state:

color: "red"

from eww.

undefinedDarkness avatar undefinedDarkness commented on May 10, 2024

Hmm, I have a widget that uses attributes in style quite a bit & it works fine, maybe It is unique to vars?, What happens if you put #f00 in color?

from eww.

legendofmiracles avatar legendofmiracles commented on May 10, 2024

The exact same error

from eww.

undefinedDarkness avatar undefinedDarkness commented on May 10, 2024

That's a bug then

from eww.

elkowar avatar elkowar commented on May 10, 2024

Is this still an issue?

from eww.

elkowar avatar elkowar commented on May 10, 2024

I'll close this, as there hasn't been a response in over a year

from eww.

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.