Skip to content

Commit 72c079e

Browse files
author
Peter Hozak
committed
improve explanation (after code review feedback)
1 parent df9c4e3 commit 72c079e

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

03-css-debugging/README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,10 @@ cd src/examples/
2626
```
2727
* 00 Intro
2828
* Using [browser inspector](https://developers.google.com/web/tools/chrome-devtools/css/) (right click > Inspect)
29-
* Good class names more important due to lack of step-by-step debug
29+
* No step-by-step debug
30+
* So good class names are more important
31+
* Or at least React component names, including [HOC](https://reactjs.org/docs/higher-order-components.html#convention-wrap-the-display-name-for-easy-debugging)
32+
* Temporary background / outline also useful
3033
* Know thy framework / use consistent code style to simplify search in code
3134
* CSS vs CSS-in-JS => hot reload vs cleaner code over time
3235
* 01 Vertical alignment

03-css-debugging/src/App.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,13 @@
3333
}
3434
}
3535

36+
// !! Keep following code, to uncomment during parts of live demo. !!
37+
//
3638
//$debugColor: #c30;
3739
//* {
3840
// background: rgba($debugColor, .1) !important;
3941
// outline: 1px dotted $debugColor !important;
4042
// color: $debugColor !important;
4143
//}
44+
//
45+
// !! End keep !!

03-css-debugging/src/examples/examples.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,6 @@
4141

4242

4343
#ddfdsfas, div[dsfas*=fsafdsa], .first.second, .dfasfsafasdfc {
44+
// overwriting Intro styles "by accident"
4445
color: red;
4546
}

0 commit comments

Comments
 (0)