Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

CSS lexer doesn't know about [attr$=value] #2043

Open
verhovsky opened this issue Apr 7, 2024 · 0 comments
Open

CSS lexer doesn't know about [attr$=value] #2043

verhovsky opened this issue Apr 7, 2024 · 0 comments
Labels
bugfix-request A request for a bugfix to be developed.

Comments

@verhovsky
Copy link
Contributor

Name of the lexer
CSS

Code sample

a {
  color: blue;
}

/* Internal links, beginning with "#" */
a[href^="#"] {
  background-color: gold;
}

/* Links with "example" anywhere in the URL */
a[href*="example"] {
  background-color: silver;
}

/* Links with "insensitive" anywhere in the URL,
   regardless of capitalization */
a[href*="insensitive" i] {
  color: cyan;
}

/* Links with "cAsE" anywhere in the URL,
with matching capitalization */
a[href*="cAsE" s] {
  color: pink;
}

/* Links that end in ".org" */
a[href$=".org"] {
  color: red;
}

/* Links that start with "https://" and end in ".org" */
a[href^="https://"][href$=".org"]
{
  color: green;
}

https://developer.mozilla.org/en-US/docs/Web/CSS/Attribute_selectors

https://rouge.jneen.net/v4.2.1/css/YSB7CiAgY29sb3I6IGJsdWU7Cn0KCi8qIEludGVybmFsIGxpbmtzLCBiZWdpbm5pbmcgd2l0aCAiIyIgKi8KYVtocmVmXj0iIyJdIHsKICBiYWNrZ3JvdW5kLWNvbG9yOiBnb2xkOwp9CgovKiBMaW5rcyB3aXRoICJleGFtcGxlIiBhbnl3aGVyZSBpbiB0aGUgVVJMICovCmFbaHJlZio9ImV4YW1wbGUiXSB7CiAgYmFja2dyb3VuZC1jb2xvcjogc2lsdmVyOwp9CgovKiBMaW5rcyB3aXRoICJpbnNlbnNpdGl2ZSIgYW55d2hlcmUgaW4gdGhlIFVSTCwKICAgcmVnYXJkbGVzcyBvZiBjYXBpdGFsaXphdGlvbiAqLwphW2hyZWYqPSJpbnNlbnNpdGl2ZSIgaV0gewogIGNvbG9yOiBjeWFuOwp9CgovKiBMaW5rcyB3aXRoICJjQXNFIiBhbnl3aGVyZSBpbiB0aGUgVVJMLAp3aXRoIG1hdGNoaW5nIGNhcGl0YWxpemF0aW9uICovCmFbaHJlZio9ImNBc0UiIHNdIHsKICBjb2xvcjogcGluazsKfQoKLyogTGlua3MgdGhhdCBlbmQgaW4gIi5vcmciICovCmFbaHJlZiQ9Ii5vcmciXSB7CiAgY29sb3I6IHJlZDsKfQoKLyogTGlua3MgdGhhdCBzdGFydCB3aXRoICJodHRwczovLyIgYW5kIGVuZCBpbiAiLm9yZyIgKi8KYVtocmVmXj0iaHR0cHM6Ly8iXVtocmVmJD0iLm9yZyJdCnsKICBjb2xvcjogZ3JlZW47Cn0K

@verhovsky verhovsky added the bugfix-request A request for a bugfix to be developed. label Apr 7, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bugfix-request A request for a bugfix to be developed.
Projects
None yet
Development

No branches or pull requests

1 participant