Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Minor improvements#404

Open
alexdln wants to merge 2 commits into
css-modules:mastercss-modules/css-modules:masterfrom
alexdln:v0-minor-changesalexdln/css-modules:v0-minor-changesCopy head branch name to clipboard
Open

Minor improvements#404
alexdln wants to merge 2 commits into
css-modules:mastercss-modules/css-modules:masterfrom
alexdln:v0-minor-changesalexdln/css-modules:v0-minor-changesCopy head branch name to clipboard

Conversation

@alexdln

@alexdln alexdln commented Jan 20, 2024

Copy link
Copy Markdown
  1. According to the previous formulation, it seemed that only node_modules were supported, although it works fine with others
- A **CSS Module** is a CSS file where all class names and animation names are scoped locally by default. All URLs (`url(...)`) and `@imports` are in module request format (`./xxx` and `../xxx` means relative, `xxx` and `xxx/yyy` means in modules folder, i.e. in `node_modules`).
+ A **CSS Module** is a CSS file where all class names and animation names are scoped locally by default. All URLs (`url(...)`) and `@imports` are in module request format (`./xxx` and `../xxx` means relative, `xxx` and `xxx/yyy` means in modules folder, i.e. in `node_modules`, `.yarn`, etc.).
  1. It looks better and more familiar in 2024
- element.innerHTML = '<div class="' + styles.className + '">';
+ element.innerHTML = `<div class="${styles.className}">`;
  1. Example: `` - just typo

  2. It will be cleaner this way

- let styles = {};
+ const styles = {};
  1. Reduction to a common code style (like here)
- .backdrop {
- }
+ .backdrop {
+  /* ... */
+ }
  1. Reduction to a common code style (like here)
- import {Component} from 'component';
+ import { Component } from 'component';

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Morty Proxy This is a proxified and sanitized view of the page, visit original site.