cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
John742
Frequent Visitor

Strange CSS Syntax

I see this CSS syntax in one of the sample apps, and I have never seen it before. Does anyone know what the first section selector is for and why it uses a "\."?

 

.SampleNamespace\.TSTableGrid th.SimpleTable_TableHeader_Style {
    height: 3rem;
    font-family: "Segoe UI Regular", "Segoe UI", Arial, Sans-Serif;
    font-size: 1rem;
    line-height: 1.384;
    background-color: rgb(0, 0, 0);
    color: #fff;
    text-align: left;
    padding: 0.5rem;
    border-left: 0.1rem solid rgba(255, 255, 255, 0.1);
    vertical-align: middle;
    width: 100vw;
}

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
mdevaney
Super User III
Super User III

@John742
A “\” slash followed by a character denotes an escape sequence in CSS. In CSS the “.” dot refers to a class. Therefore you must escape it like this “\.” If a “.” dot appears in the name of a class or id in the HTML

StackOverflow example here:
https://stackoverflow.com/questions/12310090/css-selector-with-period-in-id

—-
Please Accept as Solution if this post answered your question so others may find it more quickly. If you found this post helpful consider giving it a Thumbs Up.

View solution in original post

1 REPLY 1
mdevaney
Super User III
Super User III

@John742
A “\” slash followed by a character denotes an escape sequence in CSS. In CSS the “.” dot refers to a class. Therefore you must escape it like this “\.” If a “.” dot appears in the name of a class or id in the HTML

StackOverflow example here:
https://stackoverflow.com/questions/12310090/css-selector-with-period-in-id

—-
Please Accept as Solution if this post answered your question so others may find it more quickly. If you found this post helpful consider giving it a Thumbs Up.

View solution in original post

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (971)