Skip to content

Commit

Permalink
Explain the function behavior further
Browse files Browse the repository at this point in the history
  • Loading branch information
talldan committed Aug 28, 2024
1 parent 534a8b5 commit b8db01a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/block-editor/src/utils/transform-styles/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@ const ROOT_SELECTOR_TOKENS = [
* instead, but this results in inconsistent specificity.
*
* This function instead inserts the prefix after the root tags but before
* any other part of the selector.
* any other part of the selector. This results in consistent specificity:
* - If a `:where()` selector is used for the prefix, all selectors output
* by `transformStyles` will have no specificity increase.
* - If a classname, id, or something else is used as the prefix, all selectors
* will have the same specificity bump when transformed.
*
* @param {string} prefix The prefix.
* @param {string} selector The selector.
Expand Down

0 comments on commit b8db01a

Please sign in to comment.