Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add css templates #2095

Open
Meierschlumpf opened this issue Jan 23, 2025 · 2 comments
Open

feat: add css templates #2095

Meierschlumpf opened this issue Jan 23, 2025 · 2 comments
Labels
decision A decision needs to be taken idea

Comments

@Meierschlumpf
Copy link
Member

Describe the feature you'd like to request

In advanced options of items, categories, dynamic sections and in custom css part of board settings we add a new functionality.
Goal of that is to add css templates, that are defined somewhere centralized (for example on a repository). When you select a template you might be able to add some variable values. An example:

Template for border radius

{
  "name": "Item border radius",
  "description": "Customize the border radius of the items on your board.",
  "variables": [{
    "type": "measurement",
    "key": "borderRadius",
    "label": "Border radius",
    "defaultValue": "8px"
  }],
  "template": {
    "type": "board",
    "css": "[data-type="item"]  .grid-stack-item-content { border-radius: ${borderRadius}; }"
  }
}

Which would then result in more or less the following UI shown to the user:

Image

Additional information

No response

@Meierschlumpf Meierschlumpf added decision A decision needs to be taken idea labels Jan 23, 2025
@FlamebergUA
Copy link

If you are to add this - that'd be awesome, and I'd like to personally ask to add:

  • background color (including opacity)
  • font-size
  • border color
  • border radius
  • something for icon size, like svg icons in weather widget
  • for certain items, like bookmarks, having 'display: none;' for URLs would be also amazing

@Meierschlumpf
Copy link
Member Author

The final goal would be a system where templates can be created on a separate repository by anyone and those then could be used by everyone

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
decision A decision needs to be taken idea
Projects
Status: No status
Development

No branches or pull requests

2 participants