X Tutup
Skip to content

Minor improvements#404

Open
alexdln wants to merge 2 commits intocss-modules:masterfrom
alexdln:v0-minor-changes
Open

Minor improvements#404
alexdln wants to merge 2 commits intocss-modules:masterfrom
alexdln:v0-minor-changes

Conversation

@alexdln
Copy link

@alexdln alexdln commented Jan 20, 2024

  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

X Tutup