Want to take control over your content and deploy website standards aligned with industry compliance, brand and style guidelines, or just good web governance practices?
Monsido’s Policy Module allows you and your team to work efficiently by automating and standardizing your content policies and ensures compliance to brand, legal, style, and regulatory standards.
The New CSS Selectors in Monsido's Policy Module
The new CSS selectors in our Policy module improve how policies are defined and this solution is far more flexible to cover policies requirements.
What are CSS Selectors?
- CSS Selectors are used to target an HTML element on your website. When you create a new policy, the CSS selectors detect a pattern of elements that tells a browser which elements should be selected to have the CSS property value inside the rule applied to them.
Search in Page HTML with CSS selectors.
- It is used to target HTML elements on your website.
- When you create a new policy, the CSS selectors detect a pattern of elements that tells a browser which elements should be selected to have the CSS property value inside the rule applied to them.
Limit searches and exclude content in a new policy.
- Limit your search for the word "dashboard" to a “page wrapper” and exclude it from search in a “header” and a “sidebar”.
What’s the benefit of using the CSS Selectors?
- Policy-creation becomes faster and easier than with Regular Expressions (Regexes), as it requires less technical know-how.
- Less error-prone, which eliminates both false positives and false negatives. It will impact the number of effective and correct policy-creation in your team.
- Met very specific organizational requirements.
What is Regex?
- "Regular expressions are patterns used to match character combinations in strings. In JavaScript, regular expressions are also objects".
Using Regular Expressions has many drawbacks:
- More complicated to use for creating a new policy, using regexes requires specific knowledge.
- Regex is more prone to error, which increases both false positives and false negatives.
- Some specific organizational requirements simply could not be achieved with Regexes.
Practical applications:
This new feature can be used to do in the following 2 ways:
#1) it can be used to remove elements from the search (fx remove the navigation menu) and/or to limit the search to specific elements (fx only search in the footer or in the navigation menu).
#2) after #1) has happened CSS selectors can also be used to select elements.
Example
#1) a customer working at corp.com wants to make sure the website shows no emails of the employee however the email [email protected] in the footer is ok, so it uses CSS selectors to not search the footer, to exclude it, and then then it searches for "@corporation.com"
#1) and #2)
the same customer wants to find all links that open in a new window, but there is a link in the footer with the address of the main office that opens google maps
that one is fine, so it uses CSS selectors to not search the footer, to exclude it
and then it uses CSS selectors again to find all links that open in a new window (like in the screenshot you show here) with a[target="_blank"].