Skip to content

Callouts: Expand section on customizing callouts with CSS #1047

@Tainmere

Description

@Tainmere

What is your suggestion?

The Customize Callouts section on the callouts page instructs users on how to create new callouts and states that you can use the css-classes --callout-color and --callout-icon to change the styling of it.
It does not state that you can use general CSS syntax to further customize the callout nor that you can use other CSS variables to change other aspects of colors.
Regular users might not think of using these possibilities and won't check the developer docs to see if there are more CSS variables, so they likely only use the two mentioned ways of customizing callouts and not dive further.

Example Use Cases

Using general CSS syntax to remove the title of the callout:

.callout[data-callout="custom-question-type"] .callout-title {
  display: none;
}

Using CSS Variables to change the default styling of the border

.callout[data-callout="custom-question-type"] 
  --callout-color: 175, 175, 175;
  --callout-border-opacity: 0.25;
  --callout-border-width: 2px;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementIndicates new item to be added to the docs.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions