Skip to content

Make difference between identifiers declared vs. used #463

Description

@bartveneman

For analyzing potential unused code it would be useful to know whether some 'variables' are either declared, used, both or none.

Container names

@container my-layout (inline-size: 100px) {}

main {
  container-name: my-layout;
  /* or shorthand */
  container: my-layout / inline-size;
}

.undeclared {
  container-name: i-dont-exist;
}

Custom properties

:root {
  --example: 1;
  column-count: var(--example);
}

.unused {
  --unused: 2;
}

.undeclared {
  column-count: var(--whoops);
}

.undeclared-fallback {
  column-count: var(--whoops, var(--whoopsie));
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions