Skip to content

Instantly share code, notes, and snippets.

View sreez's full-sized avatar
🎯
Focusing

Sreejith Sasidharan sreez

🎯
Focusing
View GitHub Profile
@sreez
sreez / clean_code.md
Created September 6, 2020 18:31 — forked from wojteklu/clean_code.md
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@sreez
sreez / gist:c624b3e440b66f9d16a9dc39a2297ed1
Created March 6, 2020 12:36
taiwindcss default list of padding , font size and line height against equivalent pixels for font base 16px
0px 0rem .p-0
4px 0.25rem .p-1
8px 0.5rem .p-2
12px 0.75rem .p-3, .leading-3, .text-xs
14px 0.875rem .text-sm
16px 1rem .p-4, .leading-4, .text-base
18px 1.125rem .text-lg
20px 1.25rem .p-5, .leading-5, .text-xl
24px 1.5rem .p-6, .leading-6, .text-2xl
28px 1.75rem .leading-7