custom-cards / flex-table-card

Highly Flexible Lovelace Card - arbitrary contents/columns/rows, regex matched, perfect to show appdaemon created content and anything breaking out of the entity_id + attributes concept
GNU General Public License v3.0
198 stars 23 forks source link

Feature Request: Disable borders #15

Closed CWGSM3V0 closed 4 years ago

CWGSM3V0 commented 4 years ago

Would be nice if possible. Purely asthetic :)

image

daringer commented 4 years ago

There you go, using css as config parameter you can now either replace or append provided css via the configuration. For your particular case the following should work:

/* note the "+", which is a magic character to signal __appending__ instead of */
/* __replacing__ of the selected css-statement */
css:
  table+: "border: 0;"

in contrast the following would overwrite, i.e., replace the original css:

/* which obviously leads to different results... */
css:
  table: "border:0;"

also keep in mind that several special characters and whitespaces are not allowed as json-keys, thus you'll have to put them in quotes for more sophisticated css-selectors, e.g.:

/* works without issues, too. As long as the json-key is in quotes */
css:
  'tbody tr:nth-child(even)': 'background-color: #a2542f6;'

You can check the current CSS style statements by either using "inspect" within your browser or directly check the source-code starting from here: line 216

Hope this is what you were looking for, also feel free to share an example...

daringer commented 4 years ago

also updated the README.md with a more formal usage description.

daringer commented 4 years ago

feels completed, closing... please re-open if needed