Use case or problem
I’m trying to use CSS snippets to customize the look of Cards in Bases to:
- Hide the property labels.
- Customize the positions of properties beyond order in a list.
- Adding custom looks to property values like lists.
- Show longer text without the overflow being hidden.
- Color cards or their elements based on values of properties in them.
Since Cards and their contents are layed out using absolute positioning, it is not possible to use regular CSS layouts like flex, grid and auto sizing to change up the layout. And even if the elements are rearanged using other methods, the height of cards is not modifiable which can lead to blank space or overflow.
Here’s a comparison of the default layout and what I’ve been able to get with CSS (note the extra blank space at the bottom).
backlog-cards.css (3.0 KB)
Proposed solution
The easiest way to implement this would probably be to have the contents of cards layed out using regular CSS mechanisms instead of using absolute positions. I however assume there is a good reason it was implemented this way. If this cannot change, I’m not sure how the process could be made easier than what I’ve done in the CSS snippet provided.
For card height, a multiplier could be added to each property which would inform the layout what fraction of the property’s height should be counted towards the total height of the card.
Styling cards based on values of their properties could be done by adding an option that would attach an HTML property to the root of each card with the key and value of the property, something like data-property-[name]="[value]" which would make it targetable in CSS. Putting the property on the root element would allow customizing the look of the whole card or any of its elements based on the value of any property, increasing flexibility.
Current workaround
Properties can be moved around using transform: translate() or by overriding top, left etc. with !important. The variable --bases-cards-line-height is useful for offseting vertically.
I have however not figured out a way to decrease the height of cards so that cards below them would adjust their position, as their set absolutely.

