mattxwang
Repos
93
Followers
251
Following
185

A modern, high customizable, responsive Jekyll theme for documentation with built-in search.

5396
3057

notes, code, and videos for a crash-course in front-end web dev - no experience req'd!

27
8

Course website for CS 131, Fall 22 - generated by just-the-class

5
3

🏳️‍🌈 notes, code, and links for the workshops matt ran @ QWER Hacks '21 (react, firebase, education track)

The official website for ACM at UCLA, the largest tech community on campus!

11
17

A mighty, modern linter that helps you avoid errors and enforce conventions in your styles.

10107
876

Events

Apply minor improvements to main script

Co-authored-by: Masafumi Koba 473530+ybiquitous@users.noreply.github.com

Created at 2 hours ago

Deduplicates LICENSE

Created at 2 hours ago

Adds npm-package-json-lint, resolves issues

Created at 2 hours ago

Clean up package.json

Co-authored-by: Masafumi Koba 473530+ybiquitous@users.noreply.github.com

Created at 2 hours ago

Add Node 14 to CI, remove unnecessary configs

Created at 2 hours ago

Reuse existing test workflow

Co-authored-by: Masafumi Koba 473530+ybiquitous@users.noreply.github.com

Created at 2 hours ago
pull request opened
Change documentation for `unit-allowed-list` `ignoreFunctions` option

Which issue, if any, is this issue related to?

None, as it's a documentation fix.

Is there anything in the PR that needs further explanation?

Motivated from discussion for ignoreFunctions in unit-disallowed-list.

I'm not sure how to best title this PR (tried to base it off of the CHANGELOG groups in the maintainer guide), feel free to re-title with a better wording!

Created at 2 hours ago
create branch
mattxwang create branch unit-allowed-list-ignore-functions-doc-fix
Created at 2 hours ago

Tidy up documentation, test cases

Co-authored-by: Masafumi Koba 473530+ybiquitous@users.noreply.github.com

Created at 2 hours ago
Created at 17 hours ago
started
Created at 22 hours ago

Fix selector-attribute-quotes false positives for "never" (#6571)

Co-authored-by: Masafumi Koba 473530+ybiquitous@users.noreply.github.com

Created at 1 day ago
delete branch
mattxwang delete branch selector-attribute-quotes-never-false-positives
Created at 1 day ago
closed issue
Fix false positives for "never" in selector-attribute-quotes

What is the problem you're trying to solve?

We try avoid any unnecessary quotes in selectors, so we use "selector-attribute-quotes": "never".

But some selectors really require quotes to be valid.

div[style='*'] { ... }
li[data-id='42'] { ... }

And here is why:

According to the spec http://www.w3.org/TR/CSS2/selector.html#attribute-selectors:

Attribute values must be identifiers or strings

Furthermore, according to the spec http://www.w3.org/TR/CSS2/syndata.html#value-def-identifier:

identifiers (including element names, classes, and IDs in selectors) can contain only the characters [a-zA-Z0-9] and ISO 10646 characters U+00A0 and higher, plus the hyphen (-) and the underscore (_); they cannot start with a digit, two hyphens, or a hyphen followed by a digit.

And, according to the spec http://www.w3.org/TR/CSS2/syndata.html#strings:

Strings can either be written with double quotes or with single quotes.

What solution would you like to see?

A new option for selector-attribute-quotes (e.g. "only-required" or "only-necessary"), which would work like "never", but allow/require quotes when the correspondent part of selector:

  • contains chars other than latin letters, digits, hyphen and underscore
  • starts with a digit
  • starts with double hyphen
  • starts with a hyphen followed by a digit
Created at 1 day ago
pull request closed
Fix `selector-attribute-quotes` false positives for "never"

Which issue, if any, is this issue related to?

Closes #4300.

Is there anything in the PR that needs further explanation?

First - should I add some documentation to explain this new behaviour? Or do we think the current setup is enough.

There's a bit of discussion in #4300. To reiterate @Mouvedia's point:

so to me

[href='te\'s\'t'] { }
[href="te\"s\"t"] { }

can be processed and become

[href=te\'s\'t] { }
[href=te\"s\"t] { }

but

[href="te'st"] { }
[href='te"st'] { }

should remain untouched.

As such, I've adjusted the relevant test cases. The latter two are moved from being rejected to accepted; let me know if that was the desired change (or if instead we should still report, but not fix).

Regex alternative

I realized that the CSS grammar actually has a FLEX tokenizer, so I tried to directly copy the rule as a Regex:

// directly taken from spec: https://www.w3.org/TR/CSS21/grammar.html#scanner
const h = "[0-9a-f]";
const nonascii = "[\\240-\\377]";
const unicode = "\\\\{h}{1,6}(\\r\\n|[ \\t\\r\\n\\f])?".replace("{h}", h);
const escape = "({unicode}|\\\\[^\\r\\n\\f0-9a-fA-F])".replace("{unicode}", unicode);
const nmstart = "([_a-zA-Z]|{nonascii}|{escape})".replace("{nonascii}", nonascii).replace("{escape}", escape);
const nmchar = "([_a-zA-Z0-9-]|{nonascii}|{escape})".replace("{nonascii}", nonascii).replace("{escape}", escape);
const identifier = "-?{nmstart}{nmchar}*".replace("{nmstart}", nmstart).replace("{nmchar}", nmchar);
	
return Boolean(ident.match(identifier));

Unfortunately, this doesn't work! It misses some "basic" cases, including strings with spaces in them. If anybody has any ideas on what I've done wrong, that would be great - I feel like using the CSS spec when possible seems like a good idea.

Created at 1 day ago

Bump jekyll from 4.3.1 to 4.3.2 (#120)

Bumps jekyll from 4.3.1 to 4.3.2.


updated-dependencies:

  • dependency-name: jekyll dependency-type: direct:production update-type: version-update:semver-patch ...

Signed-off-by: dependabot[bot] support@github.com Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

Created at 1 day ago
delete branch
mattxwang delete branch dependabot/bundler/jekyll-4.3.2
Created at 1 day ago
pull request closed
Bump jekyll from 4.3.1 to 4.3.2

Bumps jekyll from 4.3.1 to 4.3.2.

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Created at 1 day ago
delete branch
mattxwang delete branch dependabot/bundler/webrick-1.8.1
Created at 1 day ago