Code Monkey home page Code Monkey logo

lote-frontend-next9's Introduction

Frontend Architecture:

Creating a simple clean, and clear frontend architecture with the help of CSS Modules it is a build process, not a tool or language, It uses the javascript to locally scope the component styles and make unique class names so styles will not clash with other developer styles even a thousand developers are working on the same codebase. It is a well establish industry standard. Google and other tech industries are using same pattern. It will also make the task easier for the new developers because their styles will not break the old written styles.

With this approach, our web app is really scalable Because the styles are locally scoped to the component. This boilerplate heavily depends upon the custom styling option rather than Next.js default way of writing styles.

Whenever you choose a custom option in Next.js for styling you have to do all stuff on your own.

What stuff?

  • Minify the stylesheet for the production.
  • Add browsers autoprefixer styles on your production stylesheet.

To overcome this problem we will use PostCSS plugins.

What is PostCSS? It is a tool for transforming CSS with JavaScript and this tool consist of many plugins that help us to minify our stylesheets and add vendor prefixes so webpage styles can run on all browsers.

We also want the taste of scss in our stylesheets so we use @zeit/next-sass with node-sass package.

Our styles Supported browsers

This architecture supports the latest, stable releases of all major browsers and platforms. On Windows, only support Internet Explorer 10-11 / Microsoft Edge.

Note: Alternative browsers that use the latest version of WebKit, Blink, or Gecko, whether directly or via the platform’s web view API, are not explicitly supported.

However, the styles should (in most cases) display and function correctly in these browsers as well. But don't worry on the production different browser vendors styles are automatically added.

Some third-party packages we are using.

  • cssnano (minify our stylesheet in the production)
  • autoprefixer@9 (Autoprefixer version 9 is stable version and they are currently working on version 10 in which they are changing the principal and creating a new way to add browser vendor prefixes on the CSS. So stick with version 9 until version 10 becomes stable. What is does? This PostCSS plugin is to handle intended browser support via CSS prefixes)

License

MIT

lote-frontend-next9's People

Contributors

lotesystem avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Forkers

johohg john45321

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.