Skip to content

Commit

Permalink
direct children css styles
Browse files Browse the repository at this point in the history
  • Loading branch information
rohan-paul committed Jun 7, 2020
1 parent 79f1680 commit 71cdfca
Show file tree
Hide file tree
Showing 106 changed files with 37 additions and 2 deletions.
Empty file modified CSS/BEM-Model.md
100644 → 100755
Empty file.
Empty file modified CSS/Bootstrap/Bootstrap-grid-system.md
100644 → 100755
Empty file.
Empty file modified CSS/Bootstrap/bootstrap-d-flex.md
100644 → 100755
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,40 @@ It represents a p element that is a descendant of an li element; the li element

So in the above **descendant** means an elmenent can be a child or grandchild or any level of nested child.

#### The main point is **>** is the **child combinator** while A descendant combinator is whitespace that separates two compound selectors.
#### The main point is **>** is the **child combinator**, which means it must be the direct child of a parent element.
#### Whereas a descendant combinator is whitespace that separates two compound selectors.

### A good example from production grade real-life app - to declare the styles of a parent class with ALL its direct children to have this styles. A blanket declaration of capture all direct childrent with the "*"

parent.component.scss

```scss
.parent-wrapping-class {
> * {
margin-right: 1rem
margin-bottom: 1.2rem
height: 3.571rem
}

> *:last-child {
margin-right: 0;
}
}
```

Then the html will be like below, (this is an Angular .html file)

```html
<div class="parent-wrapping-class">
<child-component
[item]="data"
[disabled]="disabled"
>
</child-component>
</div>
```

So in the above case all the direct children of "parent-wrapping-class" will get the styles as delacred in the .scss file

#### Descendant combinator

Expand Down
Empty file modified CSS/SCSS/ampersand-in-scss.md
100644 → 100755
Empty file.
Empty file modified CSS/SCSS/mixin-basics.md
100644 → 100755
Empty file.
Empty file modified CSS/box-Model.md
100644 → 100755
Empty file.
Empty file modified CSS/left-vs-margin-left.md
100644 → 100755
Empty file.
Empty file modified CSS/not-pseudo-class-selector.md
100644 → 100755
Empty file.
Empty file modified CSS/relative-positioning-basic-good-notes.md
100644 → 100755
Empty file.
Empty file modified CSS/rem-unit-basics-and-converting-px.md
100644 → 100755
Empty file.
Empty file modified CSS/z-index.md
100644 → 100755
Empty file.
Empty file modified Event-Loop-Asynchronous-setTimeout/Event-Loop-in-JS.md
100644 → 100755
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file.
Empty file modified Git-and-Github/Delete-Branch.md
100644 → 100755
Empty file.
Empty file modified Git-and-Github/PR-Flow/Pull-Request-submit.md
100644 → 100755
Empty file.
Empty file.
Empty file.
Empty file modified Git-and-Github/git-rebase/git-rebase-4.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions Git-and-Github/git-rebase/git-rebase-Resolving-merge-conflicts--Git-rebase.md
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ And then continue the rebasing process

`$ git rebase --continue`

And in a single cycle of rebasing you may get these conflicts multiple times.

#### Now most probably when you try to push to remote - you will be stopped from pushing to branch after rebase

[stackoverflow.com/questions/15143042/cant-push-to-branch-after-rebase](https://stackoverflow.com/questions/15143042/cant-push-to-branch-after-rebase)
Expand Down
2 changes: 1 addition & 1 deletion Git-and-Github/git-rebase/git-rebase.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ git rebase dev

**In most regular day-to-day cases (i.e. when I am rebasing on top of master), the commands will be**

`git rebase dev`
`git checkout dev`
`git rebase master`

As most of the cases on a regular day, I would have to rebase on top of master branch.
Expand Down
Empty file modified GraphQL/Why-GraphQL-What-is-GraphQL.md
100644 → 100755
Empty file.
Empty file modified GraphQL/graphQL-Schema.md
100644 → 100755
Empty file.
Empty file modified Javascript/ES6-Array-Helper-Methods/forEach-vs-map.md
100644 → 100755
Empty file.
Empty file modified Javascript/Null-Coalescing-operator.md
100644 → 100755
Empty file.
Empty file.
Empty file.
Empty file modified Javascript/OOP-Prototypal-Inheritence/OOP-Basics-1.md
100644 → 100755
Empty file.
Empty file.
Empty file.
Empty file.
Empty file modified Javascript/OOP-Prototypal-Inheritence/OOP-basics-2.md
100644 → 100755
Empty file.
Empty file.
Empty file.
Empty file modified Javascript/Tricky-JS-Problems/logical-and-operator.js
100644 → 100755
Empty file.
Empty file modified Javascript/Tricky-JS-Problems/plain-class-functions.js
100644 → 100755
Empty file.
Empty file modified Javascript/Tricky-JS-Problems/value-of-null.js
100644 → 100755
Empty file.
Empty file modified Javascript/arrow-function/arrow-function-and-this-keyword.md
100644 → 100755
Empty file.
Empty file modified Javascript/arrow-function/arrow-vs-regular-functions.md
100644 → 100755
Empty file.
Empty file modified Javascript/call-apply-bind/bind-why-its-needed.md
100644 → 100755
Empty file.
Empty file modified Javascript/call-apply-bind/call-function-basics-1.md
100644 → 100755
Empty file.
Empty file modified Javascript/const-var-let.md
100644 → 100755
Empty file.
Empty file modified Javascript/curried-function.md
100644 → 100755
Empty file.
Empty file modified Javascript/js-basics/Closure/closure-tricky-GREAT-EXAMPLE.JS
100644 → 100755
Empty file.
Empty file.
Empty file modified Javascript/js-basics/Closure/closure-why-its-needed.js
100644 → 100755
Empty file.
Empty file.
Empty file modified Javascript/js-data-types/BigInt-data-type.md
100644 → 100755
Empty file.
Empty file modified Javascript/js-data-types/check-data-type-with-typeof.js
100644 → 100755
Empty file.
Empty file modified Javascript/js-data-types/data-types-Number-Famous-Question.md
100644 → 100755
Empty file.
Empty file modified Javascript/js-data-types/data-types-Number.md
100644 → 100755
Empty file.
Empty file modified Javascript/js-data-types/data-types-symbol.md
100644 → 100755
Empty file.
Empty file modified Javascript/null-coalescing.jpeg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file.
Empty file.
Empty file.
Empty file modified Javascript/this-keyword/this-keyword-simplest-catagories.md
100644 → 100755
Empty file.
Empty file modified Javascript/truthy-falsy-2.md
100644 → 100755
Empty file.
Empty file.
Empty file modified Javascript/truthy-falsy.js
100644 → 100755
Empty file.
Empty file modified Javascript/undefined-vs-not_defined.md
100644 → 100755
Empty file.
Empty file modified MongoDB/aggregation-in-mongodb.md
100644 → 100755
Empty file.
Empty file modified MongoDB/indexing-in-mongo.md
100644 → 100755
Empty file.
Empty file modified MongoDB/sharding-in-mongodb.md
100644 → 100755
Empty file.
Empty file.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file modified React/Hooks/convert-ClassBasedForm-to-HooksBasedForm.md
100644 → 100755
Empty file.
Empty file modified React/Hooks/lifeCycle-methods-for-various-hooks.md
100644 → 100755
Empty file.
Empty file modified React/Hooks/updateState-with-callback.md
100644 → 100755
Empty file.
Empty file modified React/Hooks/useEffect-api-call-with-async-inside-useEffect.md
100644 → 100755
Empty file.
Empty file modified React/Hooks/useEffect-async-call-inside.md
100644 → 100755
Empty file.
Empty file modified React/Hooks/useEffect-basics-1.md
100644 → 100755
Empty file.
Empty file.
Empty file.
Empty file modified React/Hooks/useEffect-replace-componentDidMount-and-Update.md
100644 → 100755
Empty file.
Empty file modified React/Hooks/useEffect-replace-componentWillUnmount.md
100644 → 100755
Empty file.
Empty file.
Empty file modified React/Hooks/useEffect-with-Redux-actions-GOOD.md
100644 → 100755
Empty file.
Empty file modified React/Hooks/useReducer-basics-1.md
100644 → 100755
Empty file.
Empty file.
Empty file modified React/Hooks/userReducer-vs-redux-reducer.md
100644 → 100755
Empty file.
Empty file modified React/functional-component-declaration-syntax-1.md
100644 → 100755
Empty file.
Empty file modified React/preventDefault-in-React.md
100644 → 100755
Empty file.
Empty file modified React/pureComponent-Performance-benefit.md
100644 → 100755
Empty file.
Empty file modified React/pureComponent.md
100644 → 100755
Empty file.
Empty file modified React/refs-in-react/execute-child-function-from-parent.md
100644 → 100755
Empty file.
Empty file modified React/refs-in-react/refs-Call-child-method-from-parent.md
100644 → 100755
Empty file.
Empty file modified React/refs-in-react/useRef-basics.md
100644 → 100755
Empty file.
Empty file modified React/server-side-rendering-react-app.md
100644 → 100755
Empty file.
Empty file modified Redux/actions.payload.md
100644 → 100755
Empty file.
Empty file.
Empty file modified Typscript/JS-to-TS-Migration/js-to-ts-1.md
100644 → 100755
Empty file.
Empty file modified Web-Development-In-General/critical-render-path.md
100644 → 100755
Empty file.
Empty file modified Web-Development-In-General/websocket-basics.md
100644 → 100755
Empty file.
Empty file modified report.20200209.024254.24169.001.json
100644 → 100755
Empty file.

0 comments on commit 71cdfca

Please sign in to comment.