jarek-foksa / xel

Xel - Widget toolkit for building native-like Electron and Web apps
https://xel-toolkit.org
Other
691 stars 59 forks source link

Vanilla theme css #85

Closed ghost closed 3 years ago

ghost commented 5 years ago

Problem

I am making an app with electron and Angular and when I work with the Material Design theme evrything works fine but when I want to work with the Vanilla Design theme then nothing shows up.

What I have done

I added next line to Styles array: node_modules/xel/themes/vanilla.css

Solution

I have found a solution but still wanted to report it because i don't know that what I am doing is legit:

I deleted this from the vanilla.css: *:not(:defined) { display: none; }

jarek-foksa commented 5 years ago

I just checked several Angular demo apps and they appear to rely on custom elements such as <app-root> which were not properly registered with customElements.define().

So the proper fix would require replacing:

*:not(:defined) {
  display: none;
}

with:

x-button:not(:defined),
x-checkbox:not(:defined),
...
x-input:not(:defined) {
  display: none;
}
ghost commented 5 years ago

I just checked several Angular demo apps and they appear to rely on custom elements such as <app-root> which were not properly registered with customElements.define().

So the proper fix would require replacing:

*:not(:defined) {
  display: none;
}

with:

x-button:not(:defined),
x-checkbox:not(:defined),
...
x-input:not(:defined) {
  display: none;
}

For evry Xel element?

jarek-foksa commented 5 years ago

Yes.

jarek-foksa commented 3 years ago

Fixed in Xel version 0.9.