You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
using this macro for CSS functions with parentheses in its parameter, e.g. {{CSSXref("abs()")}}, results in flaws, as parentheses are still kept in the URLs;
:host() and fit-content() needs special-casing to append _function in the URLs.
- // Deal with CSS functions by removing ()- var slug = $0.replace(/<(.*)>/g, '$1');+ // Deal with CSS data types and functions by removing <> and ()+ var slug = $0.replace(/<(.*)>/g, "$1")+ .replace(/\(\)/g, "");- // Special case <color>, <flex>, and <position>- switch ($0) {- case '<color>':- slug = 'color_value';- break;-- case '<flex>':- slug = 'flex_value';- break;-- case '<position>':- slug = 'position_value';- break;- }+ // Special case <color>, <flex>, <overflow>, and <position>+ if (/^<(color|flex|overflow|position)>$/.test($0)) {+ slug += "_value";+ }++ // Special case :host() and fit-content()+ if (/^(:host|fit-content)\(\)$/.test($0)) {+ slug += "_function";+ }
caugner
added
has PR
Issues that already have a PR
and removed
needs triage
Triage needed by staff and/or partners. Automatically applied when an issue is opened.
labels
May 4, 2023
Summary
Since mdn/content#14006:
{{CSSXref("abs()")}}
, results in flaws, as parentheses are still kept in the URLs;:host()
andfit-content()
needs special-casing to append_function
in the URLs.Also:
<overflow>
, which needs special-casing, too.cssxref.ejs
need correction.Proposed solution
On Line 53:
URL
mdn/content#26575
Reproduction steps
Expected behavior
No flaw for {{CSSXref("url()")}}.
Actual behavior
A redirection flaw.
Device
Desktop
Browser
Firefox
Browser version
Stable
Operating system
Windows
Screenshot
No response
Anything else?
Relates to #8578.
Related discussion: https://github.com/orgs/mdn/discussions/369
Validations
The text was updated successfully, but these errors were encountered: