A new Thought on CSS

Source: Internet
Author: User

Because of being sent to help other groups, have the opportunity to write a bit of react, found that the ice made of the suite used to build the back-end system is really too much force (inserted in the table component is actually can be removed to add the seat base method added). Because looked at the demo code and for Jsx grammar unfamiliar, so a moment at a loss to the CSS to write where to find react for CSS processing has been different from the original traditional for the definition of CSS, refer to this article

React very central idea is: 1. Data and UI layering; 2. Component, the 2nd is actually built on the 1th, in the back-end system of the use is just too appropriate, and I was in the koala when I want to do is similar, but react components used is really too convenient, directly to the data props into component can be directly displayed. However, a little off-topic, writing this article is mainly to say that the impact of the CSS concept of the impact on me, the traditional CSS developed for so many years, at each stage of the developers to provide him with development tools such as sass, less and other simplification of the process. However, CSS itself has some drawbacks, such as CSS is a very global thing, namespaces need to add themselves (so the Sass&less class of "programming language"), and in many cases can not be reused, I have always felt like to write the inline style, However, in order to maintainability are as far as possible written in the CSS file.

However, the effect of the style is classified as 1 in the above-mentioned stack network. Layout; 2. Appearance;3. Behavior & state, where layout is not suitable as inline-style to write, and the latter appearance is the most convenient to write the inline style, and the third because of the change of the (such as hover, Activate state), because the react itself has state management, so it is natural to use the inline style to handle it. This gives the impression that it is true to think about the nature of one thing and why there are existing problems and solutions, including the emergence of the react framework.

Have the opportunity really should see react and JSX, CSS a few conf, really will broaden a lot of ideas, including today in Stackexchange see puzzle is also very interesting, compared to the palm of meaningless comments, Reddit on S6 on the evaluation to be more exciting. These days on the code engineering Thinking and read the "as Program World" in the Software development principles of the summary, to a large extent due to dry (dont repeat yourself) and this is largely by encapsulation and polymorphism, for the time being more agreeable. Once again found to enlarge their horizons a little more ah ...

A new Thought on CSS

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.