Migrate to CSS modules

Đang mở
#1,437 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
25/100
Loại issue
Tái cấu trúc
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
css, javascript, react, webpack
Lĩnh vực
frontend, web-dev

Hướng nghiên cứu

Bắt đầu bằng cách đọc application.css và ánh xạ các khối BEM của nó tới các component React tương ứng. So sánh cách tiếp cận import trực tiếp CSS module với babel-plugin-react-css-modules, sau đó xác định các phụ thuộc về style giữa component cha và component con. Được xem là hoàn tất khi stylesheet nguyên khối đã được migrate theo từng component mà không có sự coupling về style giữa các component.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

code quality

CSS modules are pretty clearly the future. Migrate from monolithic application.css to CSS modules.

Currently feeling ambivalent about using direct CSS module import (supported by webpack) vs. something like babel-plugin-react-css-modules.

In general this should be relatively straightforward since the BEM blocks defined in application.css roughly correspond to React components. Ultimately we will want to just go one component at a time, migrating all of the rule sets used by classes in that component into the component’s companion CSS module.

We will want to be vigilant for situations in which there is coupling between styles in different components: for example, a situation in which a parent component defines a flex container, but the flex items are inside a child component. Generally we’ll want to refactor so that either the container is moved into the child component, or the flex items are moved down into the parent component; components should be self-contained from a styling standpoint.

Ngôn ngữ chính
JavaScript
Star
191
Fork
143
Merge trung bình
4 ngày 11 giờ
Pull request đã merge (30 ngày)
5

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của popcodeorg/popcode

Tất cả issue của popcodeorg/popcode

Issue tương tự

Thêm issue về JavaScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.