├── .DS_Store ├── .github ├── ISSUE_TEMPLATE │ └── feature_request.md └── pull_request_template.md ├── CONTRIBUTING.md ├── CSSButtons ├── index.html └── style.css ├── CSSFlexbox ├── #1 Template │ ├── index.html │ └── style.css ├── #2 display flex │ ├── index.html │ └── style.css ├── #3 Flex Wrap │ ├── index.html │ └── style.css ├── #4 Flex JustifyContent │ ├── index.html │ └── style.css ├── #5 Flex basis │ ├── index.html │ └── style.css ├── #6 Flex grow │ ├── index.html │ └── style.css ├── #7 Flex shrink │ ├── index.html │ └── style.css └── #8 Flex order │ ├── index.html │ └── style.css ├── CSSScrollBehaviour ├── index.html └── style.css ├── README.md ├── Text-numeric ├── index.html └── style.css ├── css-alert-status ├── index.html └── style.css ├── css-badge ├── index.html └── style.css ├── css-cards ├── index.html └── style.css ├── css-list ├── index.html └── style.css ├── css-table ├── Table.html └── table.css ├── css-tags ├── index.html └── style.css ├── css └── base.css ├── cssCalc ├── index.html └── style.css ├── cssClickableGallery ├── index.html └── style.css ├── cssCounter ├── index.html └── style.css ├── cssFilters ├── index.html ├── script.js └── style.css ├── cssGrids ├── .DS_Store ├── 01-display │ ├── index.html │ └── style.css ├── 02-columns │ ├── index.html │ └── style.css ├── 03-rows │ ├── index.html │ └── style.css ├── 04-gap │ ├── index.html │ └── style.css ├── 05-gridAreas │ ├── index.html │ └── style.css ├── 06-flow │ ├── index.html │ └── style.css └── 07-rows-and-columns │ ├── index.html │ └── style.css ├── cssMixins ├── index.html └── style.css ├── cssVariables ├── index.html └── style.css ├── cssWritingModes ├── index.html └── style.css ├── currentcolor ├── index.html └── style.css ├── galleries ├── 01 │ ├── index.html │ └── style.css └── 02 │ ├── index.html │ └── style.css ├── images ├── alerts.png ├── buttons.png ├── cards.png └── tags.png └── responsive ├── index.html └── style.css /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Neha/css3-demos/9104a2ead5657428619870ea8298110350461ee5/.DS_Store -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: Feature 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe your feature** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the technology or features of CSS you used** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Is it responsive** 17 | - [ ] Yes 18 | - [ ] No 19 | - [ ] NA 20 | 21 | **Is it accessible** 22 | - [ ] Yes 23 | - [ ] No 24 | - [ ] NA 25 | 26 | **Have you tested in on all browsers?** 27 | - [ ] Yes 28 | - [ ] No 29 | - [ ] NA 30 | -------------------------------------------------------------------------------- /.github/pull_request_template.md: -------------------------------------------------------------------------------- 1 | # Title of your PR 2 | 3 | 4 | # Describe your PR 5 | 6 | 7 | # JIRA Numbers and Link 8 | 9 | 10 | # Release Number 11 | 12 | 13 | # Have you tested them on the Browsers? 14 | - [ ] Yes 15 | - [ ] No 16 | 17 | # Have you wrote the testcases? 18 | - [ ] Yes 19 | - [ ] No 20 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Hacktoberfest 2019 2 | Welcome to the month of learning, sharing, and raising PRs. Being a developer and active community person I keep getting lot of questions 3 | from where to start for contribution. Hence, here it is my repo of CSS3 examples open for contribution for first-timer or seasoned 4 | CSS developers or anyone who is learning CSS. 5 | 6 | ## Rules: 7 | - Be very very nice 8 | - Have empathy 9 | - Remember goal is to __learn and share__ not to prove __who is more smarter__ 10 | - If stuck ask for help. Trust me there is no issue is asking help. 11 | 12 | ## Code Guidlines: 13 | - The biggest rule is the code should be only HTML and CSS NO JAVASCRIPT. 14 | - The code should be valid HTML and CSS 15 | - The code should be ready to use 16 | - The code should be generic to use 17 | 18 | ## Where to start contributing? 19 | - Documentation 20 | - Pipelines (may be??) 21 | - New features, modules suggestions 22 | - PR for pending tasks 23 | - Check to Issues 24 | 25 | ## Who I am? 26 | I am Neha Sharma, a curious and learner. Here is my [twitter](https://twitter.com/hellonehha) account. 27 | -------------------------------------------------------------------------------- /CSSButtons/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | CSS Buttons 4 | 5 | 6 | 7 | 8 | 9 |
10 |

CSS Buttons

11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | -------------------------------------------------------------------------------- /CSSButtons/style.css: -------------------------------------------------------------------------------- 1 | /* Global CSS */ 2 | 3 | #container { 4 | --padding-global: 10px; 5 | background: #eee; 6 | width: calc(780px - var(--padding-global) * 2); 7 | margin: 20px auto; 8 | padding: 10px; 9 | display: flex; 10 | flex-direction: column; 11 | align-items: center; 12 | } 13 | 14 | h1 { 15 | text-align: center; 16 | margin-bottom: 40px; 17 | color: #67005f; 18 | } 19 | 20 | .margin-around { 21 | margin: 10px; 22 | } 23 | 24 | /* Example CSS */ 25 | button { 26 | padding: 10px; 27 | text-align: center; 28 | min-width: 200px; 29 | font-size: 1.2rem; 30 | font-weight: 400; 31 | text-transform: uppercase; 32 | background: #ff308a; 33 | color: #fff; 34 | border: 2px solid #67005f; 35 | } 36 | 37 | .round { 38 | border-radius: 30px; 39 | } 40 | 41 | .drop-shadow { 42 | box-shadow: 3px 4px 4px #27104c; 43 | } 44 | 45 | .no-fill { 46 | background: #fff; 47 | color: #ff308a; 48 | border: 2px solid currentColor; 49 | } 50 | 51 | .lifted { 52 | box-shadow: 3px 4px 0px #27104c; 53 | } 54 | 55 | .gradient { 56 | background-image: linear-gradient(#ff308a, #900240); 57 | } 58 | 59 | /* Hover CSS */ 60 | button:hover { 61 | background: #67005f; 62 | } 63 | -------------------------------------------------------------------------------- /CSSFlexbox/#1 Template/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | CSS Flexbox 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | 14 |
15 |
16 |
17 |

Heading 1

18 | 19 |

This is the sample text

20 |
21 |
22 |

Heading 2

23 | 24 |

This is the sample text

25 |
26 |
27 |

Heading 3

28 | 29 |

This is the sample text

30 |
31 |
32 |

Heading 4

33 | 34 |

This is the sample text

35 |
36 |
37 |

Heading 5

38 | 39 |

This is the sample text

40 |
41 |
42 | 43 |
44 | 45 | 46 | -------------------------------------------------------------------------------- /CSSFlexbox/#1 Template/style.css: -------------------------------------------------------------------------------- 1 | * { 2 | margin: 0; 3 | padding: 0; 4 | box-sizing: border-box; 5 | } 6 | 7 | /* main */ 8 | main { 9 | width: 80%; 10 | margin: 0 auto; 11 | background: #eee; 12 | padding: 10px; 13 | font-family: monospace; 14 | } 15 | 16 | /* header */ 17 | header { 18 | background-color: #000; 19 | padding: 1em; 20 | color: #fff; 21 | display: flex; 22 | justify-content: space-between; 23 | } 24 | 25 | nav a { 26 | padding: 0 5px; 27 | color: #fff; 28 | } 29 | 30 | /* section */ 31 | section { 32 | display: flex; 33 | padding: 2em 0; 34 | } 35 | 36 | section .item { 37 | padding: 1em .5em; 38 | } 39 | 40 | .item img { 41 | width: 100%; 42 | margin: 5px 0; 43 | } 44 | 45 | /* footer */ 46 | footer { 47 | padding: 1em; 48 | background-color: #000; 49 | text-align: center; 50 | color: #fff; 51 | } -------------------------------------------------------------------------------- /CSSFlexbox/#2 display flex/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | CSS Flexbox 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | 14 |
15 |
16 |
17 |

Heading 1

18 | 19 |

This is the sample text

20 |
21 |
22 |

Heading 2

23 | 24 |

This is the sample text

25 |
26 |
27 |

Heading 3

28 | 29 |

This is the sample text

30 |
31 |
32 |

Heading 4

33 | 34 |

This is the sample text

35 |
36 |
37 |

Heading 5

38 | 39 |

This is the sample text

40 |
41 |
42 | 43 |
44 | 45 | 46 | -------------------------------------------------------------------------------- /CSSFlexbox/#2 display flex/style.css: -------------------------------------------------------------------------------- 1 | * { 2 | margin: 0; 3 | padding: 0; 4 | box-sizing: border-box; 5 | } 6 | 7 | /* main */ 8 | main { 9 | width: 80%; 10 | margin: 0 auto; 11 | background: #eee; 12 | padding: 10px; 13 | font-family: monospace; 14 | } 15 | 16 | /* header */ 17 | header { 18 | background-color: #000; 19 | padding: 1em; 20 | color: #fff; 21 | display: flex; 22 | justify-content: space-between; 23 | } 24 | 25 | nav a { 26 | padding: 0 5px; 27 | color: #fff; 28 | } 29 | 30 | /* section */ 31 | section { 32 | display: flex; 33 | padding: 2em 0; 34 | } 35 | 36 | section .item { 37 | padding: 1em .5em; 38 | } 39 | 40 | .item img { 41 | width: 100%; 42 | margin: 5px 0; 43 | } 44 | 45 | /* footer */ 46 | footer { 47 | padding: 1em; 48 | background-color: #000; 49 | text-align: center; 50 | color: #fff; 51 | } 52 | 53 | /* flexbox */ 54 | header, 55 | .content { 56 | display: flex; 57 | flex-direction: row; 58 | } 59 | header{ 60 | justify-content: space-between; 61 | } 62 | -------------------------------------------------------------------------------- /CSSFlexbox/#3 Flex Wrap/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | CSS Flexbox 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | 14 |
15 |
16 |
17 |

Heading 1

18 | 19 |

This is the sample text

20 |
21 |
22 |

Heading 2

23 | 24 |

This is the sample text

25 |
26 |
27 |

Heading 3

28 | 29 |

This is the sample text

30 |
31 |
32 |

Heading 4

33 | 34 |

This is the sample text

35 |
36 |
37 |

Heading 5

38 | 39 |

This is the sample text

40 |
41 |
42 | 43 |
44 | 45 | 46 | -------------------------------------------------------------------------------- /CSSFlexbox/#3 Flex Wrap/style.css: -------------------------------------------------------------------------------- 1 | * { 2 | margin: 0; 3 | padding: 0; 4 | box-sizing: border-box; 5 | } 6 | 7 | /* main */ 8 | main { 9 | width: 80%; 10 | margin: 0 auto; 11 | background: #eee; 12 | padding: 10px; 13 | font-family: monospace; 14 | } 15 | 16 | /* header */ 17 | header { 18 | background-color: #000; 19 | padding: 1em; 20 | color: #fff; 21 | display: flex; 22 | justify-content: space-between; 23 | } 24 | 25 | nav a { 26 | padding: 0 5px; 27 | color: #fff; 28 | } 29 | 30 | /* section */ 31 | section { 32 | display: flex; 33 | padding: 2em 0; 34 | } 35 | 36 | section .item { 37 | padding: 1em .5em; 38 | } 39 | 40 | .item img { 41 | width: 100%; 42 | margin: 5px 0; 43 | } 44 | 45 | /* footer */ 46 | footer { 47 | padding: 1em; 48 | background-color: #000; 49 | text-align: center; 50 | color: #fff; 51 | } 52 | 53 | /* flexbox warp */ 54 | header, 55 | .content { 56 | display: flex; 57 | flex-wrap: wrap; 58 | } 59 | header{ 60 | justify-content: space-between; 61 | } 62 | -------------------------------------------------------------------------------- /CSSFlexbox/#4 Flex JustifyContent/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | CSS Flexbox 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | 14 |
15 |
16 |
17 |

Heading 1

18 | 19 |

This is the sample text

20 |
21 |
22 |

Heading 2

23 | 24 |

This is the sample text

25 |
26 |
27 |

Heading 3

28 | 29 |

This is the sample text

30 |
31 |
32 |

Heading 4

33 | 34 |

This is the sample text

35 |
36 |
37 |

Heading 5

38 | 39 |

This is the sample text

40 |
41 |
42 | 43 |
44 | 45 | 46 | -------------------------------------------------------------------------------- /CSSFlexbox/#4 Flex JustifyContent/style.css: -------------------------------------------------------------------------------- 1 | * { 2 | margin: 0; 3 | padding: 0; 4 | box-sizing: border-box; 5 | } 6 | 7 | /* main */ 8 | main { 9 | width: 80%; 10 | margin: 0 auto; 11 | background: #eee; 12 | padding: 10px; 13 | font-family: monospace; 14 | } 15 | 16 | /* header */ 17 | header { 18 | background-color: #000; 19 | padding: 1em; 20 | color: #fff; 21 | display: flex; 22 | justify-content: space-between; 23 | } 24 | 25 | nav a { 26 | padding: 0 5px; 27 | color: #fff; 28 | } 29 | 30 | /* section */ 31 | section { 32 | padding: 2em 0; 33 | } 34 | 35 | section .item { 36 | padding: 1em .5em; 37 | } 38 | 39 | .item img { 40 | width: 100%; 41 | margin: 5px 0; 42 | } 43 | 44 | /* footer */ 45 | footer { 46 | padding: 1em; 47 | background-color: #000; 48 | text-align: center; 49 | color: #fff; 50 | } 51 | 52 | /* flexbox justify content*/ 53 | header, 54 | .content { 55 | display: flex; 56 | flex-wrap: wrap; 57 | justify-content: center; 58 | } 59 | header{ 60 | justify-content: space-between; 61 | } 62 | -------------------------------------------------------------------------------- /CSSFlexbox/#5 Flex basis/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | CSS Flexbox 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | 14 |
15 |
16 |
17 |

Heading 1

18 | 19 |

This is the sample text

20 |
21 |
22 |

Heading 2

23 | 24 |

This is the sample text

25 |
26 |
27 |

Heading 3

28 | 29 |

This is the sample text

30 |
31 |
32 |

Heading 4

33 | 34 |

This is the sample text

35 |
36 |
37 |

Heading 5

38 | 39 |

This is the sample text

40 |
41 |
42 | 43 |
44 | 45 | 46 | -------------------------------------------------------------------------------- /CSSFlexbox/#5 Flex basis/style.css: -------------------------------------------------------------------------------- 1 | * { 2 | margin: 0; 3 | padding: 0; 4 | box-sizing: border-box; 5 | } 6 | 7 | /* main */ 8 | main { 9 | width: 80%; 10 | margin: 0 auto; 11 | background: #eee; 12 | padding: 10px; 13 | font-family: monospace; 14 | } 15 | 16 | /* header */ 17 | header { 18 | background-color: #000; 19 | padding: 1em; 20 | color: #fff; 21 | display: flex; 22 | justify-content: space-between; 23 | } 24 | 25 | nav a { 26 | padding: 0 5px; 27 | color: #fff; 28 | } 29 | 30 | /* section */ 31 | section { 32 | padding: 2em 0; 33 | } 34 | 35 | section .item { 36 | padding: 1em .5em; 37 | } 38 | 39 | .item img { 40 | width: 100%; 41 | margin: 5px 0; 42 | } 43 | 44 | /* footer */ 45 | footer { 46 | padding: 1em; 47 | background-color: #000; 48 | text-align: center; 49 | color: #fff; 50 | } 51 | 52 | /* flexbox */ 53 | header, 54 | .content { 55 | display: flex; 56 | flex-wrap: wrap; 57 | justify-content: center; 58 | } 59 | header{ 60 | justify-content: space-between; 61 | } 62 | /* flex basis */ 63 | .content div:nth-of-type(5) { 64 | -webkit-flex-basis: 100%; /* Safari 6.1+ */ 65 | flex-basis: 100%; 66 | padding: 0 2em; 67 | } -------------------------------------------------------------------------------- /CSSFlexbox/#6 Flex grow/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | CSS Flexbox 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | 14 |
15 |
16 |
17 |

Heading 1

18 | 19 |

This is the sample text

20 |
21 |
22 |

Heading 2

23 | 24 |

This is the sample text

25 |
26 |
27 |

Heading 3

28 | 29 |

This is the sample text

30 |
31 |
32 |

Heading 4

33 | 34 |

This is the sample text

35 |
36 |
37 |

Heading 5

38 | 39 |

This is the sample text

40 |
41 |
42 | 43 |
44 | 45 | 46 | -------------------------------------------------------------------------------- /CSSFlexbox/#6 Flex grow/style.css: -------------------------------------------------------------------------------- 1 | * { 2 | margin: 0; 3 | padding: 0; 4 | box-sizing: border-box; 5 | } 6 | 7 | /* main */ 8 | main { 9 | width: 80%; 10 | margin: 0 auto; 11 | background: #eee; 12 | padding: 10px; 13 | font-family: monospace; 14 | } 15 | 16 | /* header */ 17 | header { 18 | background-color: #000; 19 | padding: 1em; 20 | color: #fff; 21 | display: flex; 22 | justify-content: space-between; 23 | } 24 | 25 | nav a { 26 | padding: 0 5px; 27 | color: #fff; 28 | } 29 | 30 | /* section */ 31 | section { 32 | padding: 2em 0; 33 | } 34 | 35 | section .item { 36 | padding: 1em .5em; 37 | } 38 | 39 | .item img { 40 | width: 100%; 41 | margin: 5px 0; 42 | } 43 | 44 | /* footer */ 45 | footer { 46 | padding: 1em; 47 | background-color: #000; 48 | text-align: center; 49 | color: #fff; 50 | } 51 | 52 | /* flexbox */ 53 | header, 54 | .content { 55 | display: flex; 56 | flex-wrap: wrap; 57 | justify-content: center; 58 | } 59 | header{ 60 | justify-content: space-between; 61 | } 62 | /* fex grow */ 63 | .content div:nth-of-type(5) { 64 | flex-grow: 1; 65 | padding: 0 2em; 66 | } -------------------------------------------------------------------------------- /CSSFlexbox/#7 Flex shrink/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | CSS Flexbox 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | 14 |
15 |
16 |
17 |

Heading 1

18 | 19 |

This is the sample text

20 |
21 |
22 |

Heading 2

23 | 24 |

This is the sample text

25 |
26 |
27 |

Heading 3

28 | 29 |

This is the sample text

30 |
31 |
32 |

Heading 4

33 | 34 |

This is the sample text

35 |
36 |
37 |

Heading 5

38 | 39 |

This is the sample text

40 |
41 |
42 | 43 |
44 | 45 | 46 | -------------------------------------------------------------------------------- /CSSFlexbox/#7 Flex shrink/style.css: -------------------------------------------------------------------------------- 1 | * { 2 | margin: 0; 3 | padding: 0; 4 | box-sizing: border-box; 5 | } 6 | 7 | /* main */ 8 | main { 9 | width: 80%; 10 | margin: 0 auto; 11 | background: #eee; 12 | padding: 10px; 13 | font-family: monospace; 14 | } 15 | 16 | /* header */ 17 | header { 18 | background-color: #000; 19 | padding: 1em; 20 | color: #fff; 21 | display: flex; 22 | justify-content: space-between; 23 | } 24 | 25 | nav a { 26 | padding: 0 5px; 27 | color: #fff; 28 | } 29 | 30 | /* section */ 31 | section { 32 | padding: 2em 0; 33 | } 34 | 35 | section .item { 36 | padding: 1em .5em; 37 | } 38 | 39 | .item img { 40 | width: 100%; 41 | margin: 5px 0; 42 | } 43 | 44 | /* footer */ 45 | footer { 46 | padding: 1em; 47 | background-color: #000; 48 | text-align: center; 49 | color: #fff; 50 | } 51 | 52 | /* flexbox */ 53 | header, 54 | .content { 55 | display: flex; 56 | justify-content: center; 57 | } 58 | header{ 59 | justify-content: space-between; 60 | } 61 | /* Flex Shrink */ 62 | .content div{ 63 | flex-shrink: 3; 64 | } 65 | .content div:nth-of-type(1), 66 | .content div:nth-of-type(5) { 67 | flex-shrink: 2; 68 | } -------------------------------------------------------------------------------- /CSSFlexbox/#8 Flex order/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | CSS Flexbox 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | 14 |
15 |
16 |
17 |

Heading 1 2

18 | 19 |

This is the sample text

20 |
21 |
22 |

Heading 2 1

23 | 24 |

This is the sample text

25 |
26 |
27 |

Heading 3 4

28 | 29 |

This is the sample text

30 |
31 |
32 |

Heading 4 3

33 | 34 |

This is the sample text

35 |
36 |
37 |

Heading 5

38 | 39 |

This is the sample text

40 |
41 |
42 | 43 |
44 | 45 | 46 | -------------------------------------------------------------------------------- /CSSFlexbox/#8 Flex order/style.css: -------------------------------------------------------------------------------- 1 | * { 2 | margin: 0; 3 | padding: 0; 4 | box-sizing: border-box; 5 | } 6 | 7 | /* main */ 8 | main { 9 | width: 80%; 10 | margin: 0 auto; 11 | background: #eee; 12 | padding: 10px; 13 | font-family: monospace; 14 | } 15 | 16 | /* header */ 17 | header { 18 | background-color: #000; 19 | padding: 1em; 20 | color: #fff; 21 | display: flex; 22 | justify-content: space-between; 23 | } 24 | 25 | nav a { 26 | padding: 0 5px; 27 | color: #fff; 28 | } 29 | 30 | /* section */ 31 | section { 32 | display: flex; 33 | padding: 2em 0; 34 | } 35 | 36 | section .item { 37 | padding: 1em .5em; 38 | } 39 | 40 | .item img { 41 | width: 100%; 42 | margin: 5px 0; 43 | } 44 | 45 | /* footer */ 46 | footer { 47 | padding: 1em; 48 | background-color: #000; 49 | text-align: center; 50 | color: #fff; 51 | } 52 | 53 | /* flexbox */ 54 | header, 55 | .content { 56 | display: flex; 57 | flex-wrap: wrap; 58 | justify-content: center; 59 | } 60 | header{ 61 | justify-content: space-between; 62 | } 63 | /* flex order */ 64 | .content div:nth-of-type(1) { 65 | -webkit-order: 2; 66 | order: 2; 67 | } 68 | .content div:nth-of-type(2) { 69 | -webkit-order: 1; 70 | order: 1; 71 | } 72 | .content div:nth-of-type(3) { 73 | -webkit-order: 4; 74 | order: 4; 75 | } 76 | .content div:nth-of-type(4) { 77 | -webkit-order: 3; 78 | order: 3; 79 | } 80 | .content div:nth-of-type(5) { 81 | -webkit-order:5; 82 | order: 5; 83 | } 84 | -------------------------------------------------------------------------------- /CSSScrollBehaviour/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | CSS Scrollbehaviour 5 | 6 | 7 | 8 | 9 | 10 |
11 | Link One 12 |
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque condimentum mattis massa, non pharetra metus pharetra eu. Aenean sagittis sollicitudin imperdiet. Quisque aliquet dui turpis, fermentum ornare nibh condimentum nec. Integer porta tortor urna, id maximus ex aliquet rutrum. Mauris ultricies, velit at pellentesque varius, nisi nisi laoreet odio, ac semper velit enim at magna. Aliquam et odio sit amet ex accumsan mollis. Nulla euismod dui at nisl gravida, id hendrerit arcu iaculis. Sed porttitor massa non erat auctor, nec accumsan velit euismod. 13 | 14 | Pellentesque elit augue, tristique et lorem at, fermentum scelerisque purus. Phasellus fringilla, urna vitae condimentum fringilla, dui quam venenatis nulla, id placerat ante dolor sed nulla. Aenean et auctor massa. Vestibulum elementum in tellus sed interdum. Nunc eget erat posuere, convallis felis ac, aliquet leo. Vivamus feugiat odio in est blandit, sit amet sodales quam posuere. Quisque et convallis ante. Ut convallis orci in dui porta, et bibendum lacus sodales. Donec est dui, maximus ac nisi at, viverra mollis dui. Fusce est quam, blandit at erat ultricies, luctus laoreet augue. Fusce in augue porta, porttitor sapien ut, pellentesque mauris. Suspendisse sit amet nisi massa. Aenean quis nunc porttitor, convallis massa suscipit, aliquet diam.
15 |
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque condimentum mattis massa, non pharetra metus pharetra eu. Aenean sagittis sollicitudin imperdiet. Quisque aliquet dui turpis, fermentum ornare nibh condimentum nec. Integer porta tortor urna, id maximus ex aliquet rutrum. Mauris ultricies, velit at pellentesque varius, nisi nisi laoreet odio, ac semper velit enim at magna. Aliquam et odio sit amet ex accumsan mollis. Nulla euismod dui at nisl gravida, id hendrerit arcu iaculis. Sed porttitor massa non erat auctor, nec accumsan velit euismod. 16 | 17 | Pellentesque elit augue, tristique et lorem at, fermentum scelerisque purus. Phasellus fringilla, urna vitae condimentum fringilla, dui quam venenatis nulla, id placerat ante dolor sed nulla. Aenean et auctor massa. Vestibulum elementum in tellus sed interdum. Nunc eget erat posuere, convallis felis ac, aliquet leo. Vivamus feugiat odio in est blandit, sit amet sodales quam posuere. Quisque et convallis ante. Ut convallis orci in dui porta, et bibendum lacus sodales. Donec est dui, maximus ac nisi at, viverra mollis dui. Fusce est quam, blandit at erat ultricies, luctus laoreet augue. Fusce in augue porta, porttitor sapien ut, pellentesque mauris. Suspendisse sit amet nisi massa. Aenean quis nunc porttitor, convallis massa suscipit, aliquet diam.
18 |
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque condimentum mattis massa, non pharetra metus pharetra eu. Aenean sagittis sollicitudin imperdiet. Quisque aliquet dui turpis, fermentum ornare nibh condimentum nec. Integer porta tortor urna, id maximus ex aliquet rutrum. Mauris ultricies, velit at pellentesque varius, nisi nisi laoreet odio, ac semper velit enim at magna. Aliquam et odio sit amet ex accumsan mollis. Nulla euismod dui at nisl gravida, id hendrerit arcu iaculis. Sed porttitor massa non erat auctor, nec accumsan velit euismod. 19 | 20 | Pellentesque elit augue, tristique et lorem at, fermentum scelerisque purus. Phasellus fringilla, urna vitae condimentum fringilla, dui quam venenatis nulla, id placerat ante dolor sed nulla. Aenean et auctor massa. Vestibulum elementum in tellus sed interdum. Nunc eget erat posuere, convallis felis ac, aliquet leo. Vivamus feugiat odio in est blandit, sit amet sodales quam posuere. Quisque et convallis ante. Ut convallis orci in dui porta, et bibendum lacus sodales. Donec est dui, maximus ac nisi at, viverra mollis dui. Fusce est quam, blandit at erat ultricies, luctus laoreet augue. Fusce in augue porta, porttitor sapien ut, pellentesque mauris. Suspendisse sit amet nisi massa. Aenean quis nunc porttitor, convallis massa suscipit, aliquet diam.
21 | 22 |
23 | 24 | 25 | -------------------------------------------------------------------------------- /CSSScrollBehaviour/style.css: -------------------------------------------------------------------------------- 1 | html { 2 | scroll-behavior: smooth; 3 | } 4 | 5 | .container { 6 | width: 400px; 7 | height: 400px; 8 | margin: 0 auto; 9 | } 10 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # :computer: CSS3 New Features Code Demos & more... 2 | 3 | This repo is dedicated to all the new CSS features releasing in the CSS. 4 | This is WIP repo and less jazzy UI (I know it should be jazzy , as we are talking about CSS). 5 | 6 | # :grey_question: Why? 7 | 8 | While learning new CSS3 features and making youtube videos for JSLovers, I started this repo. Also, to reduce the development efforts I have created ready-to-use code samples for the devs. 9 | 10 | ## :pushpin: TOC 11 | 12 | ### New Features 13 | 14 | - :white_check_mark: calc 15 | - :white_check_mark: counter 16 | - :white_check_mark: filters 17 | - :white_check_mark: mixins [UPDATE: NOT ANYMORE SUPPORTED] 18 | - :white_check_mark: scroll behaviour 19 | - :white_check_mark: variables 20 | - :white_check_mark: writing modes 21 | - :white_check_mark: current color 22 | - flexbox - work in progress 23 | - grids 24 | 25 | ### CSS + HTML Ready to use code 26 | 27 | - :white_check_mark: Buttons 28 | - :white_check_mark: Alerts & Notification 29 | - :white_check_mark: Tags 30 | - :white_check_mark: List 31 | - :white_check_mark: Card 32 | - Badges 33 | - Tables 34 | - Images 35 | - Forms 36 | - Navigation 37 | - Layouts 38 | - Gallery 39 | - Accordion 40 | - Icons 41 | - Tabs 42 | - Slideshow 43 | 44 | ## :bulb: Ready to use code - HTML and CSS 45 | 46 | Below are the ready-to-use CSS and HTML code snippts for your project. 47 | Right now, this is work-in-progress repo. 48 | 49 | ### CSS Buttons 50 | 51 | ![](images/buttons.png) 52 | 53 | ### CSS Tags 54 | 55 | ![](images/tags.png) 56 | 57 | ### CSS Alerts 58 | 59 | ![](images/alerts.png) 60 | 61 | ### CSS Cards 62 | 63 | ![](images/cards.png) 64 | 65 | # :bulb: CSS3 New Features: 66 | 67 | Below are the new CSS3 features code samples. 68 | 69 | - current color 70 | 71 | ```sh 72 | .border{ 73 | color: red; 74 | border: 1px solid currentColor; 75 | } 76 | ``` 77 | 78 | - Writing Modes 79 | 80 | ```sh 81 | .border{ 82 | color: red; 83 | border: 1px solid currentColor; 84 | } 85 | ``` 86 | 87 | - CSS calc 88 | 89 | ```sh 90 | .box{ 91 | width: calc(100 * 2px); 92 | } 93 | ``` 94 | 95 | - CSS filters 96 | - CSS Mixins 97 | - CSS Variables 98 | 99 | ```sh 100 | :root: { 101 | --red : red; 102 | } 103 | 104 | .block { 105 | color :var(--red) 106 | } 107 | 108 | ``` 109 | 110 | - CSS Grids 111 | - CSS Flexbox 112 | 113 | # :watch: What's next? 114 | 115 | - Add all possible 'ready to use' codes. 116 | - Make the code responsive. 117 | - Make the all examples accessible. 118 | - Add colors options. 119 | - Add styleguide. 120 | 121 | # :heart: Contribution 122 | 123 | If you would like to contribute please raise the PR. 124 | 125 | # Reach Me :woman: 126 | 127 | You can email me at nsharma215@gmail.com or reach me on twitter @hellonehha 128 | -------------------------------------------------------------------------------- /Text-numeric/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | CSS Text Numeric 5 | 6 | 7 | 8 | 9 | 10 |
11 |

Hey, look now you can differinate between 0 and 0

12 |

123

13 |

1st

14 |
15 | 16 | 17 | -------------------------------------------------------------------------------- /Text-numeric/style.css: -------------------------------------------------------------------------------- 1 | main { 2 | --padding-global: 10px; 3 | background: #eee; 4 | width: calc(780px - var(--padding-global) * 2); 5 | margin: 0 auto; 6 | padding: 10px; 7 | } 8 | body { 9 | font-family: arial; 10 | } 11 | h3 { 12 | font-size: 34px; 13 | } 14 | .slashed { 15 | font-variant-numeric: slashed-zero; 16 | } 17 | .old { 18 | font-variant-numeric: oldstyle-nums; 19 | } 20 | .ordinal { 21 | font-variant-numeric: ordinal; 22 | font-size: 11px; 23 | font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; 24 | } 25 | 26 | -------------------------------------------------------------------------------- /css-alert-status/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | CSS Alert 5 | 6 | 7 | 8 | 9 | 10 |
11 |

CSS Alerts

12 |
13 |

This is the warning Note

14 |

Text

15 |
16 |
17 |

This is the error Note

18 |

Text

19 |
20 |
21 |

This is the success Note

22 |

Text

23 |
24 |
25 |

This is the default Note

26 |

Text

27 |
28 | 29 |
30 |

This is the warning Note

31 |

Text

32 |
33 |
34 |

This is the error Note

35 |

Text

36 |
37 |
38 |

This is the success Note

39 |

Text

40 |
41 |
42 |

This is the default Note

43 |

Text

44 |
45 | 46 |
47 | 48 | 49 | -------------------------------------------------------------------------------- /css-alert-status/style.css: -------------------------------------------------------------------------------- 1 | /* Global CSS */ 2 | 3 | #container { 4 | --padding-global: 10px; 5 | background: #eee; 6 | width: calc(780px - var(--padding-global) * 2); 7 | margin: 20px auto; 8 | padding: 10px; 9 | display: flex; 10 | flex-direction: column; 11 | align-items: center; 12 | } 13 | 14 | h1 { 15 | text-align: center; 16 | margin-bottom: 40px; 17 | color: #000; 18 | } 19 | 20 | .margin-around { 21 | margin: 10px; 22 | } 23 | 24 | /* CSS Alerts */ 25 | .alert{ 26 | min-width:500px; 27 | min-height:100px; 28 | padding:10px; 29 | background:#B9E5FF; 30 | color:#000; 31 | } 32 | 33 | .alert h2{ 34 | color:#2280b7; 35 | margin-bottom:10px; 36 | font-size:1.5rem; 37 | text-transform: uppercase; 38 | } 39 | .alert p{ 40 | text-align: justify; 41 | } 42 | 43 | .success { 44 | background: #ACF0AD; 45 | } 46 | 47 | .success h2{ 48 | color: #009202; 49 | } 50 | 51 | .error { 52 | background: #EB8F87; 53 | } 54 | 55 | .error h2{ 56 | color: #da2b1b 57 | } 58 | 59 | .warning { 60 | background: #FFFBBA; 61 | } 62 | 63 | .warning h2{ 64 | color: #c5ba00 65 | } 66 | 67 | .border-warning{ 68 | border-left:4px solid #c5ba00; 69 | } 70 | .border-success{ 71 | border-left:4px solid #009202; 72 | } 73 | .border-error{ 74 | border-left:4px solid #da2b1b; 75 | } 76 | .border{ 77 | border-left:4px solid #2280b7; 78 | } -------------------------------------------------------------------------------- /css-badge/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | CSS Badge 8 | 9 | 10 | 11 | 12 |
13 | class='badge' : 14 | 9 15 | 999 16 | Notification 17 |
18 |
19 | class='badge badge-round' : 20 | 9 21 | 999 22 | Notification 23 |
24 |
25 | class='badge badge-round badge-dark' : 26 | 9 27 | 999 28 | Notification 29 |
30 |
31 | class='badge badge-round badge-success' : 32 | 9 33 | 999 34 | Notification 35 |
36 |
37 | class='badge badge-round badge-error': 38 | 9 39 | 999 40 | Notification 41 |
42 | 43 | -------------------------------------------------------------------------------- /css-badge/style.css: -------------------------------------------------------------------------------- 1 | body { 2 | min-height: 100vh; 3 | min-width: 100vw; 4 | display: flex; 5 | flex-direction: column; 6 | justify-content: center; 7 | align-items: center; 8 | } 9 | 10 | .example { 11 | margin: 10px 0; 12 | } 13 | 14 | /* BADGE CODE STARTS HERE */ 15 | 16 | .badge { 17 | color: #fff; 18 | background-color: #b3b3b3; 19 | display: inline-block; 20 | padding: .25em .4em; 21 | font-size: 75%; 22 | font-weight: 700; 23 | line-height: 1; 24 | text-align: center; 25 | white-space: nowrap; 26 | vertical-align: baseline; 27 | border-radius: 2px; 28 | } 29 | 30 | .badge-round { 31 | border-radius: 100px; 32 | } 33 | 34 | .badge-error { 35 | color: #fff; 36 | background-color: #b30000; 37 | } 38 | 39 | .badge-success { 40 | color: #fff; 41 | background-color: #258e25; 42 | } 43 | 44 | .badge-dark { 45 | color: #fff; 46 | background-color: #404040; 47 | } 48 | 49 | /* BADGE CODE ENDS HERE */ -------------------------------------------------------------------------------- /css-cards/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | CSS Cards 4 | 5 | 6 | 7 | 8 |

CSS Cards

9 |
10 |
11 |

This is the title

12 |
13 |
14 |

This is the title

15 |
16 |
17 |

This is header

18 |

This is body

19 |

This is footer

20 |
21 |
22 |

This is header

23 |

This is body

24 | 25 |
26 |
27 | 28 | -------------------------------------------------------------------------------- /css-cards/style.css: -------------------------------------------------------------------------------- 1 | /* Global CSS */ 2 | 3 | #container { 4 | --padding-global: 10px; 5 | width: calc(780px - var(--padding-global) * 2); 6 | margin: 20px auto; 7 | padding: 10px; 8 | display: flex; 9 | flex-wrap:wrap; 10 | } 11 | 12 | h1 { 13 | text-align: center; 14 | margin-bottom: 40px; 15 | color: #000; 16 | } 17 | 18 | .margin-around { 19 | margin: 10px; 20 | } 21 | 22 | /* Example CSS */ 23 | .card-container { 24 | width: 200px; 25 | height: 200px; 26 | background: #fff; 27 | box-shadow: 2px 2px 3px #ccc; 28 | padding: 20px; 29 | } 30 | 31 | .card-container p { 32 | line-height: 21px; 33 | } 34 | 35 | .card-container.card-header{ 36 | padding:0; 37 | position: relative; 38 | width:240px; 39 | height:240px; 40 | } 41 | 42 | .card-header > header{ 43 | background: cadetblue; 44 | padding:10px; 45 | } 46 | 47 | .card-header > header h2{ 48 | font-weight:400 49 | } 50 | 51 | .card-header > header + p { 52 | margin:10px; 53 | line-height: 21px; 54 | } 55 | 56 | .card-header footer{ 57 | background: #c8e7e8; 58 | position: absolute; 59 | bottom: 0; 60 | width: 96%; 61 | padding: 5px; 62 | } -------------------------------------------------------------------------------- /css-list/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | CSS List 4 | 5 | 6 | 7 | 8 |

CSS List

9 |
10 | 15 |
16 | 17 | -------------------------------------------------------------------------------- /css-list/style.css: -------------------------------------------------------------------------------- 1 | /* Global CSS */ 2 | 3 | #container { 4 | --padding-global: 10px; 5 | width: calc(780px - var(--padding-global) * 2); 6 | margin: 20px auto; 7 | padding: 10px; 8 | 9 | } 10 | 11 | h1 { 12 | text-align: center; 13 | margin-bottom: 40px; 14 | color: #000; 15 | } 16 | 17 | .margin-around { 18 | margin: 10px; 19 | } 20 | 21 | /* Example CSS */ 22 | ul#list{ 23 | list-style: none; 24 | } 25 | 26 | ul#list li{ 27 | padding:1.5rem; 28 | background:#eee; 29 | border-top:1px solid #ccc; 30 | border-bottom:1px solid #ccc; 31 | color: #000; 32 | } -------------------------------------------------------------------------------- /css-table/Table.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Table 7 | 8 | 9 | 10 |

Table with fixed header and hover and checkbox select :

11 |
12 |
13 | 14 | 15 | 16 | 19 | 22 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 34 | 35 | 36 | 37 | 38 | 39 | 42 | 43 | 44 | 45 | 46 | 47 | 50 | 51 | 52 | 53 | 54 | 55 | 58 | 59 | 60 | 61 | 62 | 63 | 66 | 67 | 68 | 69 | 70 | 71 | 74 | 75 | 76 | 77 | 78 | 79 | 82 | 83 | 84 | 85 | 86 | 87 | 90 | 91 | 92 | 93 | 94 | 95 | 98 | 99 | 100 | 101 |
17 | Name 18 | 20 | Email-ID 21 | 23 | Gender 24 |
name1name1@gmail.com 32 | Male
33 | Female
name2name2@gmail.com 40 | Male
41 | Female
name3name3@gmail.com 48 | Male
49 | Female
name4name4@gmail.com 56 | Male
57 | Female
name5name5@gmail.com 64 | Male
65 | Female
name6name6@gmail.com 72 | Male
73 | Female
name7name7@gmail.com 80 | Male
81 | Female
name8name8@gmail.com 88 | Male
89 | Female
name9name9@gmail.com 96 | Male
97 | Female
102 |
103 |
104 |

Table with Rows of 2 different height and nohover :

105 |
106 |
107 | 108 | 109 | 110 | 113 | 116 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 |
111 |
Name
112 |
114 |
Email-ID
115 |
117 |
Phone
118 |
name1name1@gmail.com123456
name2name2@gmail.com123456
name3name3@gmail.com123456
name4name4@gmail.com123456
name5name5@gmail.com123456
name6name6@gmail.com123456
name7name7@gmail.com123456
name8name8@gmail.com123456
name9name9@gmail.com123456
169 |
170 |
171 | 172 | 173 | -------------------------------------------------------------------------------- /css-table/table.css: -------------------------------------------------------------------------------- 1 | tbody { 2 | display: block; 3 | max-height: 200px; 4 | overflow-y: scroll; 5 | } 6 | 7 | .container { 8 | height: 350px; 9 | } 10 | 11 | table { 12 | border-spacing: 0; 13 | width: 100%; 14 | } 15 | 16 | td { 17 | border-left: 1px solid #eee; 18 | } 19 | 20 | td, 21 | th { 22 | border-bottom: 1px solid #eee; 23 | background: #fff; 24 | color: #000; 25 | padding: 10px 25px; 26 | } 27 | th{ 28 | background: #82dede; 29 | color:#fff; 30 | } 31 | 32 | th:first-child div { 33 | border: none; 34 | } 35 | 36 | .scroll-table { 37 | overflow-y: auto; 38 | height: 250px; 39 | } 40 | tr { 41 | display: table; 42 | width: 100%; 43 | } 44 | h3 { 45 | color: #808080; 46 | } 47 | 48 | table .hover-effect tr:hover td { 49 | background-color: #e6e8e8; 50 | } 51 | .hg{ 52 | height:50px; 53 | } 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /css-tags/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | CSS Tags 4 | 5 | 6 | 7 | 8 | 9 |

CSS Tags

10 |
11 | 12 |
This is a tag
13 |
This is a tag
14 |
This is a tag
15 |
16 | 17 | -------------------------------------------------------------------------------- /css-tags/style.css: -------------------------------------------------------------------------------- 1 | /* Global CSS */ 2 | 3 | #container { 4 | --padding-global: 10px; 5 | background: #eee; 6 | width: calc(780px - var(--padding-global) * 2); 7 | margin: 20px auto; 8 | padding: 10px; 9 | display: flex; 10 | 11 | align-items: center; 12 | } 13 | 14 | h1 { 15 | text-align: center; 16 | margin-bottom: 40px; 17 | color: #000; 18 | } 19 | 20 | .margin-around { 21 | margin: 10px; 22 | } 23 | 24 | /* Example CSS */ 25 | .tag{ 26 | background:#000; 27 | color:#fff; 28 | padding:5px; 29 | } 30 | .round{ 31 | border-radius:30px; 32 | padding:5px 10px; 33 | } 34 | 35 | .no-fill{ 36 | background:#fff; 37 | border:1px solid #000; 38 | color:#000; 39 | } -------------------------------------------------------------------------------- /css/base.css: -------------------------------------------------------------------------------- 1 | /* Minimum Reset CSS */ 2 | * { 3 | margin: 0; 4 | padding: 0; 5 | } 6 | 7 | body { 8 | font-family: Arial, Helvetica, sans-serif; 9 | font-size: 1rem; 10 | color: black; 11 | box-sizing: border-box; 12 | } 13 | -------------------------------------------------------------------------------- /cssCalc/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | CSS Calc() 5 | 6 | 7 | 8 | 9 | 10 |
11 |
1
12 |
2
13 |
3
14 |
15 | 16 | 17 | -------------------------------------------------------------------------------- /cssCalc/style.css: -------------------------------------------------------------------------------- 1 | main { 2 | --padding-global: 10px; 3 | background: #eee; 4 | width: calc( 780px - var(--padding-global) * 2); 5 | margin: 0 auto; 6 | padding: 10px; 7 | } -------------------------------------------------------------------------------- /cssClickableGallery/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Image Gallery 7 | 8 | 9 | 10 |

SAMPLE CLICKABLE GALLERY

11 | 38 | 39 | -------------------------------------------------------------------------------- /cssClickableGallery/style.css: -------------------------------------------------------------------------------- 1 | *, *::before, *::after{ 2 | margin: 0; 3 | padding: 0; 4 | } 5 | 6 | .heading{ 7 | text-align: center; 8 | margin: 10px 0; 9 | } 10 | 11 | .gallery{ 12 | width: 90%; 13 | display: grid; 14 | margin: 0 auto; 15 | grid-template-columns: repeat(4, minmax(200px,1fr)); 16 | grid-column-gap: 10px; 17 | grid-row-gap: 10px; 18 | } 19 | 20 | .card-wrapper{ 21 | width: 100%; 22 | /* padding: 5px; */ 23 | margin: auto; 24 | grid-auto-flow: column; 25 | } 26 | .card img{ 27 | width: 100%; 28 | height: inherit; 29 | object-fit: initial; 30 | } 31 | @media only screen and (max-width: 924px){ 32 | .gallery{ 33 | grid-template-columns: repeat(3, minmax(200px,1fr)); 34 | } 35 | } 36 | @media only screen and (max-width: 687px){ 37 | .gallery{ 38 | grid-template-columns: repeat(2, minmax(200px,1fr)); 39 | } 40 | } 41 | @media only screen and (max-width: 459px){ 42 | .gallery{ 43 | grid-template-columns: 1fr; 44 | } 45 | } -------------------------------------------------------------------------------- /cssCounter/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | CSS Counter 5 | 6 | 7 | 8 | 9 | 10 |
11 |

Hello!! CSS Counter. New way and dynamic way to generate the counter by CSS.

12 |
13 |

Starters

14 |

A starter is a small quantity of food that is served as the first course of a meal. ... A car's starter is basically an electric motor. 3. countable noun [usually plural] The starters in a race are the people or animals who take part at the beginning even if they do not finish.

15 |
16 |
Cheese Balls
17 |
Honey Fires
18 |
Mushrooms with cheese
19 |
Paneer
20 |
Peas
21 |
22 |
23 |
24 |

Main Course

25 |

The main course is the featured or primary dish in a meal consisting of several courses. It usually follows the entrée ("entry") course.

26 |
27 |
Curry and Breads
28 |
Thai Curry and Rice
29 |
Palak and breads
30 |
Mushrooms
31 |
Pizza veg and spicy
32 |
33 |
34 |
35 |

Desserts

36 |

A usually sweet course or dish (as of pastry or ice cream) usually served at the end of a meal

37 |
38 |
Custard
39 |
Seasonal fruits
40 |
Icecreams
41 |
Choclate Pastery
42 |
Rum balls
43 |
44 |
45 |
46 | 47 | 48 | -------------------------------------------------------------------------------- /cssCounter/style.css: -------------------------------------------------------------------------------- 1 | main { 2 | --padding-global: 10px; 3 | background: #eee; 4 | width: calc(780px - var(--padding-global) * 2); 5 | margin: 0 auto; 6 | padding: 10px; 7 | } 8 | 9 | body { 10 | counter-reset: section; 11 | } 12 | 13 | h2 { 14 | border-top: 1px solid #b7b7b7; 15 | border-bottom: 1px solid currentColor; 16 | line-height: 52px; 17 | } 18 | 19 | h2::before { 20 | counter-increment: section; 21 | content: "This is " counter(section) " : "; 22 | } 23 | 24 | dl { 25 | counter-reset: dl; 26 | } 27 | 28 | dt::before { 29 | counter-increment: dl; 30 | content: " " counter(dl) " : "; 31 | } 32 | -------------------------------------------------------------------------------- /cssFilters/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | CSS Filters 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /cssFilters/script.js: -------------------------------------------------------------------------------- 1 | var buttonElm = document.getElementsByTagName('button'), 2 | imgElm = document.getElementById('image'); 3 | 4 | for (var i = 0; i < buttonElm.length; i++) { 5 | buttonElm[i].addEventListener('click', function(e) { 6 | 7 | if (imgElm.hasAttribute('class') === true) { 8 | imgElm.removeAttribute('class'); 9 | } 10 | var filter = this.getAttribute('data-filter'); 11 | imgElm.classList.add(filter); 12 | }); 13 | 14 | } -------------------------------------------------------------------------------- /cssFilters/style.css: -------------------------------------------------------------------------------- 1 | .blur { 2 | -webkit-filter: blur(2px); 3 | /* Safari 6.0 - 9.0 */ 4 | filter: blur(2px); 5 | } 6 | 7 | .saturate { 8 | -webkit-filter: saturate(10%); 9 | /* Safari 6.0 - 9.0 */ 10 | filter: saturate(10%); 11 | } 12 | 13 | .invert { 14 | -webkit-filter: invert(30%); 15 | /* Safari 6.0 - 9.0 */ 16 | filter: invert(30%); 17 | } 18 | 19 | .grayscale { 20 | -webkit-filter: grayscale(30%); 21 | /* Safari 6.0 - 9.0 */ 22 | filter: invert(30%); 23 | } 24 | 25 | .brightness { 26 | -webkit-filter: brightness(30%); 27 | /* Safari 6.0 - 9.0 */ 28 | filter: brightness(30%); 29 | } 30 | 31 | .contrast { 32 | -webkit-filter: contrast(30%); 33 | /* Safari 6.0 - 9.0 */ 34 | filter: contrast(30%); 35 | } 36 | 37 | .rotate { 38 | -webkit-filter: hue-rotate(30deg); 39 | /* Safari 6.0 - 9.0 */ 40 | filter: hue-rotate(30deg); 41 | } 42 | 43 | .opacity { 44 | -webkit-filter: opacity(0.3); 45 | /* Safari 6.0 - 9.0 */ 46 | filter: opacity(0.3); 47 | } 48 | 49 | .sepia { 50 | -webkit-filter: sepia(30%); 51 | /* Safari 6.0 - 9.0 */ 52 | filter: rotate(30%); 53 | } 54 | -------------------------------------------------------------------------------- /cssGrids/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Neha/css3-demos/9104a2ead5657428619870ea8298110350461ee5/cssGrids/.DS_Store -------------------------------------------------------------------------------- /cssGrids/01-display/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 |
Section One
9 |
Section Two
10 |
Section Three
11 |
12 | 13 | -------------------------------------------------------------------------------- /cssGrids/01-display/style.css: -------------------------------------------------------------------------------- 1 | body{ 2 | background: #eee; 3 | font-size: 16px; 4 | } 5 | 6 | .wrapper{ 7 | width: 80%; 8 | margin: 0 auto; 9 | display: grid; 10 | } 11 | 12 | .wrapper > div{ 13 | padding: 1rem; 14 | } 15 | 16 | -------------------------------------------------------------------------------- /cssGrids/02-columns/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 |
Section One
9 |
Section Two
10 |
Section Three
11 |
12 | 13 | -------------------------------------------------------------------------------- /cssGrids/02-columns/style.css: -------------------------------------------------------------------------------- 1 | body{ 2 | background: #eee; 3 | font-size: 16px; 4 | } 5 | 6 | .wrapper{ 7 | width: 80%; 8 | margin: 0 auto; 9 | display: grid; 10 | grid-template-columns: 200px auto 200px; 11 | } 12 | 13 | .wrapper > div{ 14 | padding: 1rem; 15 | border: 1px solid #fff; 16 | } 17 | 18 | -------------------------------------------------------------------------------- /cssGrids/03-rows/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 |
Section One
9 |
Section Two
10 |
Section Three
11 |
12 | 13 | -------------------------------------------------------------------------------- /cssGrids/03-rows/style.css: -------------------------------------------------------------------------------- 1 | body{ 2 | background: #eee; 3 | font-size: 16px; 4 | } 5 | 6 | .wrapper{ 7 | width: 80%; 8 | margin: 0 auto; 9 | display: grid; 10 | grid-template-rows: 200px auto 200px; 11 | } 12 | 13 | .wrapper > div{ 14 | padding: 1rem; 15 | border: 1px solid #fff; 16 | } 17 | 18 | -------------------------------------------------------------------------------- /cssGrids/04-gap/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 |
Section One
9 |
Section Two
10 |
Section Three
11 |
12 | 13 | -------------------------------------------------------------------------------- /cssGrids/04-gap/style.css: -------------------------------------------------------------------------------- 1 | body{ 2 | background: #eee; 3 | font-size: 16px; 4 | } 5 | 6 | .wrapper{ 7 | width: 80%; 8 | margin: 0 auto; 9 | display: grid; 10 | grid-template-rows: 200px auto 200px; 11 | grid-gap: 10px; 12 | } 13 | 14 | .wrapper > div{ 15 | padding: 1rem; 16 | border: 1px solid #fff; 17 | } 18 | 19 | -------------------------------------------------------------------------------- /cssGrids/05-gridAreas/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 |
This is header
9 | 10 | 11 |
This is content...
12 | 13 | 14 |
15 | 16 | -------------------------------------------------------------------------------- /cssGrids/05-gridAreas/style.css: -------------------------------------------------------------------------------- 1 | body{ 2 | background: #eee; 3 | font-size: 16px; 4 | } 5 | 6 | .wrapper{ 7 | width: 80%; 8 | margin: 0 auto; 9 | display: grid; 10 | grid-gap: 10px; 11 | grid-template-areas: "header header header" 12 | "nav content content" 13 | "nav footer footer"; 14 | } 15 | 16 | header{ 17 | grid-area: header; 18 | } 19 | 20 | footer{ 21 | grid-area: footer; 22 | } 23 | 24 | nav{ 25 | grid-area: nav; 26 | } 27 | 28 | .content{ 29 | grid-area: content; 30 | height: 200px; 31 | } 32 | 33 | /* .content{ 34 | display: grid; 35 | grid-template-columns: 200px auto; 36 | } */ 37 | 38 | header, footer, 39 | .content , 40 | nav{ 41 | padding: 1rem; 42 | border: 1px solid #fff; 43 | } 44 | 45 | -------------------------------------------------------------------------------- /cssGrids/06-flow/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 |
Section One
9 |
Section Two
10 |
Section Three
11 |
Section Four
12 |
Section Five
13 |
Section Six
14 |
Section Seven
15 |
Section Eight
16 |
Section Nine
17 |
18 | 19 | -------------------------------------------------------------------------------- /cssGrids/06-flow/style.css: -------------------------------------------------------------------------------- 1 | body{ 2 | background: #eee; 3 | font-size: 16px; 4 | } 5 | 6 | .wrapper{ 7 | width: 500px; 8 | margin: 0 auto; 9 | display: grid; 10 | grid-template-columns: repeat(6, 100px); 11 | grid-gap: 10px; 12 | grid-auto-columns: 200px; 13 | grid-auto-flow: column; 14 | 15 | } 16 | 17 | .wrapper > div{ 18 | border: 1px solid #fff; 19 | } 20 | -------------------------------------------------------------------------------- /cssGrids/07-rows-and-columns/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 |
This is header
9 |
10 | 11 |
This is content...
12 |
13 | 14 |
15 | 16 | -------------------------------------------------------------------------------- /cssGrids/07-rows-and-columns/style.css: -------------------------------------------------------------------------------- 1 | body{ 2 | background: #eee; 3 | font-size: 16px; 4 | } 5 | 6 | .wrapper{ 7 | width: 80%; 8 | margin: 0 auto; 9 | display: grid; 10 | grid-template-rows: 100px auto 100px; 11 | grid-gap: 10px; 12 | } 13 | 14 | .content{ 15 | display: grid; 16 | grid-template-columns: 200px auto; 17 | } 18 | 19 | header, footer, 20 | .content > div, 21 | .content > nav{ 22 | padding: 1rem; 23 | border: 1px solid #fff; 24 | } 25 | 26 | -------------------------------------------------------------------------------- /cssMixins/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | CSS Mixins 5 | 6 | 7 | 8 | 9 | 10 |
11 |

NOT SUPPORTED BY ANY BROWSER NOW!!

12 | 13 | 14 | 15 |
16 | 17 | 18 | -------------------------------------------------------------------------------- /cssMixins/style.css: -------------------------------------------------------------------------------- 1 | section { 2 | width: 800px; 3 | background: #eee; 4 | margin: 0 auto; 5 | padding: 10px; 6 | min-height: 300px; 7 | } 8 | 9 | button { 10 | display: block; 11 | margin: 10px; 12 | @apply --button-style; 13 | } 14 | 15 | :root { 16 | --button-style: { 17 | width: 300px; 18 | padding: 30px 20px; 19 | border-radius: 5px; 20 | background: blue; 21 | color: #fff; 22 | font-size: 54px; 23 | text-transform: uppercase; 24 | } 25 | } 26 | 27 | .btnOne { 28 | background: red; 29 | font-size: 24px; 30 | padding: 10px; 31 | border: 0; 32 | } 33 | 34 | .btnTwo { 35 | background: green; 36 | width: 200px; 37 | } -------------------------------------------------------------------------------- /cssVariables/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | CSS Variables 5 | 6 | 7 | 8 | 9 | 10 |
11 |

This is the heading!!

12 |

hy

13 |
14 | 15 |
TWO
16 |

THREE

17 | 18 | 19 | -------------------------------------------------------------------------------- /cssVariables/style.css: -------------------------------------------------------------------------------- 1 | :root { 2 | --margin-10px: red; 3 | --heading-fontSize: 42px; 4 | --heading-fontfamily: Impact; 5 | --string-name: 'Naina'; 6 | --blue-color: --organe-color; 7 | --organe-color: orange; 8 | --foo: 100px; 9 | --bar: calc(var(--foo) + 10px); 10 | --f: calc(var(--bar) + 10px); 11 | } 12 | 13 | h2 { 14 | color: var(--blue-color), red; 15 | font: bold var( --heading-fontSize) var(--heading-fontfamily); 16 | --padding-global: 20px; 17 | } 18 | 19 | h3 { 20 | font-size: var( --foo); 21 | } 22 | 23 | div { 24 | padding: 10px; 25 | background: var(--blue-color); 26 | width: calc(500px - var(--padding-global)); 27 | } 28 | 29 | div:before { 30 | content: "Hello " var( --string-name); 31 | } 32 | 33 | :root, 34 | :root:lang(en) { 35 | --external-link: "external link"; 36 | } 37 | 38 | :root:lang(de) { 39 | --external-link: "externer Link"; 40 | } 41 | 42 | h3::after { 43 | content: "hello " var(--external-link) ")" 44 | } 45 | 46 | .two { 47 | width: 100px; 48 | background: Red; 49 | } 50 | 51 | .three { 52 | width: var(--foo) 53 | } -------------------------------------------------------------------------------- /cssWritingModes/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | CSS writing Modes 5 | 6 | 7 | 8 | 9 | 10 |

Hello World

11 |

This is the sample text This is the sample text This is the sample text This is the sample text This is the sample text This is the sample text This is the sample text This is the sample text This is the sample text

12 |

This is the sample text This is the sample text This is the sample text This is the sample text This is the sample text This is the sample text This is the sample text This is the sample text This is the sample text

13 |

This is the sample text This is the sample text This is the sample text This is the sample text This is the sample text This is the sample text This is the sample text This is the sample text This is the sample text

14 |
15 |
16 |

I am heading 1

17 |

18 |
19 |

I am heading 2

20 |
21 |
22 |

I am heading 3

23 |
24 |
25 |

I am heading 4

26 |
27 |
28 | 29 | 30 | -------------------------------------------------------------------------------- /cssWritingModes/style.css: -------------------------------------------------------------------------------- 1 | h1 { 2 | writing-mode: vertical-rl; 3 | float: left; 4 | } 5 | 6 | p { 7 | width: 300px; 8 | display: inline-block; 9 | } 10 | 11 | .picGrid { 12 | margin-top: 70px; 13 | } 14 | 15 | div { 16 | width: 200px; 17 | height: 200px; 18 | background: #eee; 19 | display: inline-block; 20 | } 21 | 22 | div h2 { 23 | margin-top: 30px; 24 | } 25 | 26 | .one h2 { 27 | writing-mode: vertical-lr; 28 | } 29 | 30 | .two h2 { 31 | writing-mode: vertical-lr; 32 | float: right; 33 | } 34 | 35 | .three h2 { 36 | writing-mode: vertical-lr; 37 | float: right; 38 | } 39 | 40 | .four h2 { 41 | writing-mode: vertical-lr; 42 | float: right; 43 | } -------------------------------------------------------------------------------- /currentcolor/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | CSS CurrentColor 5 | 6 | 7 | 8 | 9 |

Let's Learn CSS Secrets

10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /currentcolor/style.css: -------------------------------------------------------------------------------- 1 | body{ 2 | font-family:arial; 3 | background-color:#982286 ; 4 | text-align:center; 5 | } 6 | 7 | h2{ 8 | text-align:Center; 9 | color:#fff; 10 | text-shadow:2px 2px 2px #38194F; 11 | 12 | } 13 | button{ 14 | color:#38194F; 15 | width:300px; 16 | height:50px; 17 | border:2px solid currentColor; 18 | background-color:#fff; 19 | box-shadow:3px 3px 1px currentColor; 20 | cursor: pointer; 21 | transition: all 0.3s ease-out; 22 | border:1px solid transparent; 23 | } 24 | 25 | 26 | button:hover{ 27 | color:#7D0A91; 28 | background:currentColor; 29 | box-shadow:3px 3px 1px #38194F; 30 | border:1px solid #38194F; 31 | 32 | } 33 | 34 | button:before{ 35 | content: "HOVER ME"; 36 | color:#38194F; 37 | font-size:18px; 38 | } 39 | 40 | button:hover:before{ 41 | color:#fff; 42 | 43 | 44 | } 45 | 46 | 47 | -------------------------------------------------------------------------------- /galleries/01/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Responsive Image Gallery 8 | 9 | 10 | 11 |
12 |

Responsive Image Gallery using CSS Grid

13 |
14 |
15 | 25 |
26 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /galleries/01/style.css: -------------------------------------------------------------------------------- 1 | /* simple global reset */ 2 | * { 3 | margin: 0; 4 | padding: 0; 5 | box-sizing: border-box; 6 | } 7 | 8 | /* some document wide defaults */ 9 | html { 10 | font-family: sans-serif; 11 | color: #232425; 12 | text-rendering: optimizeLegibility; 13 | -webkit-font-smoothing: antialiased; 14 | font-kerning: normal; 15 | } 16 | 17 | /* ===== HEADER ====== */ 18 | header { 19 | padding: 1rem; 20 | background-color: #f3f4f5; 21 | } 22 | 23 | /* ===== MAIN ===== */ 24 | main { 25 | padding: 1rem; 26 | } 27 | 28 | /* ===== FOOTER ===== */ 29 | footer { 30 | padding: 1rem; 31 | } 32 | 33 | /* ===== GALLERY ===== */ 34 | .gallery { 35 | list-style: none; 36 | display: grid; 37 | grid-gap: .5rem; 38 | grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); 39 | } 40 | 41 | .gallery--item { 42 | min-height: 12rem; 43 | background-position: center; 44 | background-size: cover; 45 | background-repeat: no-repeat; 46 | display: flex; 47 | flex-direction: column; 48 | justify-content: flex-end; 49 | } 50 | -------------------------------------------------------------------------------- /galleries/02/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Responsive Image Gallery 8 | 9 | 10 | 11 |
12 |

Responsive Image Gallery using CSS Grid

13 |
14 |
15 | 41 |
42 | 45 | 46 | -------------------------------------------------------------------------------- /galleries/02/style.css: -------------------------------------------------------------------------------- 1 | /* simple global reset */ 2 | * { 3 | margin: 0; 4 | padding: 0; 5 | box-sizing: border-box; 6 | } 7 | 8 | /* some document wide defaults */ 9 | html { 10 | font-family: sans-serif; 11 | color: #232425; 12 | text-rendering: optimizeLegibility; 13 | -webkit-font-smoothing: antialiased; 14 | font-kerning: normal; 15 | } 16 | 17 | /* ===== HEADER ====== */ 18 | header { 19 | padding: 1rem; 20 | background-color: #f3f4f5; 21 | } 22 | 23 | /* ===== MAIN ===== */ 24 | main { 25 | padding: 1rem; 26 | } 27 | 28 | /* ===== FOOTER ===== */ 29 | footer { 30 | padding: 1rem; 31 | } 32 | 33 | /* ===== GALLERY ===== */ 34 | .gallery { 35 | list-style: none; 36 | display: grid; 37 | grid-gap: .5rem; 38 | grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); 39 | } 40 | 41 | .gallery--item { 42 | min-height: 12rem; 43 | background-position: center; 44 | background-size: cover; 45 | background-repeat: no-repeat; 46 | display: flex; 47 | flex-direction: column; 48 | justify-content: flex-end; 49 | } 50 | 51 | .gallery--item__content { 52 | padding: 1rem; 53 | background-image: linear-gradient(rgba(0,0,0,0), rgba(0,0,0,.75)); 54 | color: #f3f4f5; 55 | } 56 | -------------------------------------------------------------------------------- /images/alerts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Neha/css3-demos/9104a2ead5657428619870ea8298110350461ee5/images/alerts.png -------------------------------------------------------------------------------- /images/buttons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Neha/css3-demos/9104a2ead5657428619870ea8298110350461ee5/images/buttons.png -------------------------------------------------------------------------------- /images/cards.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Neha/css3-demos/9104a2ead5657428619870ea8298110350461ee5/images/cards.png -------------------------------------------------------------------------------- /images/tags.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Neha/css3-demos/9104a2ead5657428619870ea8298110350461ee5/images/tags.png -------------------------------------------------------------------------------- /responsive/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | CSS Responsive 4 | 5 | 6 | 7 | 8 | 9 |
10 |
I am Header
11 |
12 | 13 |
I am container
14 |
15 | 16 |
17 | 18 | 19 | -------------------------------------------------------------------------------- /responsive/style.css: -------------------------------------------------------------------------------- 1 | 2 | 3 | html{ 4 | box-sizing: border-box; 5 | font-size: 16px; 6 | } 7 | 8 | body{ 9 | background: yellow; 10 | color: #000; 11 | } 12 | 13 | .wrapper{ 14 | display: grid; 15 | grid-template-rows: 50px auto 40px ; 16 | grid-gap: 10px; 17 | } 18 | 19 | header, footer,.content, nav{ 20 | border-bottom: 2px dashed #fff; 21 | } 22 | 23 | /* tabs and above */ 24 | @media only screen and (min-width: 768px ) { 25 | body{ 26 | background: red; 27 | color: #fff; 28 | } 29 | .content{ 30 | display: grid; 31 | grid-template-columns: 100px auto ; 32 | } 33 | } 34 | 35 | --------------------------------------------------------------------------------