Skip to main content
12-Amethyst
November 3, 2022
Question

How to add custom CSS for newly added class in widget properties

  • November 3, 2022
  • 2 replies
  • 1886 views

Hi,

 

I need to add custom CSS for the class I added in widget properties.

 

Note: Before PTCS-CHART-LEGEND the class is displayed (saw it in inspection tool). Please reply ASAP.

 

Below is the snippet: Where to add the custom class name (clschart)

@supports (ptcs-style-unit: "PTCS-CHART-LEGEND"){
       [part=item][legend=L1] [part~=marker]{
        border-top: 5px dashed red;
        background-color: #fff !important;
    }
}

2 replies

14-Alexandrite
November 3, 2022

Hi ,

Your question is unclear whether you want to know how to create a CSS class or you want to know how to add CSS class to a widget.

From your CSS code it looks like you want to modify how legends are displayed in your chart, this should be easy by using style theme. Or there should be properties under the style properties that can be directly modified to achieve the same task.

10-Marble
November 3, 2022

I need clarification on how to use custom class in @supports css selector ??

 

10-Marble
November 3, 2022

That is add a custom class and add it to the below stylesheet

 

@supports (ptcs-style-unit: "PTCS-CHART-LEGEND"){
       [part=item][legend=L1] [part~=marker]{
        border-top: 5px dashed red;
        background-color: #fff !important;
    }
}

Community Manager
December 9, 2022

Hi @PG_10250187.

 

Can you provide more details of your custom widget?  What is widget designed for?  What are you trying to change?  Screenshots may be helpful.

 

Regards.

 

--Sharon