chunk_id stringlengths 36 36 | source stringclasses 35
values | source_url stringlengths 0 290 | upstream_license stringclasses 1
value | document_id stringlengths 36 36 | chunk_index int64 0 324k | retrieved_at stringclasses 2
values | chunker_version stringclasses 4
values | content_hash stringlengths 15 64 | content stringlengths 50 44.7k | namespace stringclasses 9
values | source_name stringclasses 35
values | raw_text stringlengths 50 44.7k | cleaned_text stringlengths 50 44.7k | tags stringclasses 49
values | collection_name stringclasses 11
values |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
65e32f59-2012-47fb-b899-a484dc55a02a | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/css/s/inset.md | unknown | 305da8b9-ab18-4686-ac77-1bc465e2d6f5 | 3 | SemanticChunker@1.0.0 | e02c7dd62b51a36d3497abcdacca7b67a9979487537e23c7901f114d9e00e385 | [What is the `inset` property? > Positioned elements]
## Positioned elements
One important thing to remember is that the `inset` property only works on **positioned elements**. This means the element must have a `position` value of `absolute`, `relative`, `fixed`, or `sticky`. Without a `position` value, the `inset` ... | unknown | unknown | [What is the `inset` property? > Positioned elements]
## Positioned elements
One important thing to remember is that the `inset` property only works on **positioned elements**. This means the element must have a `position` value of `absolute`, `relative`, `fixed`, or `sticky`. Without a `position` value, the `inset` ... | [What is the `inset` property? > Positioned elements]
## Positioned elements
One important thing to remember is that the `inset` property only works on **positioned elements**. This means the element must have a `position` value of `absolute`, `relative`, `fixed`, or `sticky`. Without a `position` value, the `inset` ... | code_snippets | ||
7f2d6462-f587-446a-b349-07a1dbd6c62b | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/css/s/inset.md | unknown | 305da8b9-ab18-4686-ac77-1bc465e2d6f5 | 1 | SemanticChunker@1.0.0 | d412907f8d42304b3952d2e78960f2b9167630f1072dfa9d2316f66207ef804d | [What is the `inset` property?]
## What is the `inset` property?
The `inset` property is a **shorthand** for `top`, `right`, `bottom`, and `left`. This can save you from the tedious process of defining these properties individually, as you can use `inset` to set them all at once.
```html
<div class="box"></div>
```
... | unknown | unknown | [What is the `inset` property?]
## What is the `inset` property?
The `inset` property is a **shorthand** for `top`, `right`, `bottom`, and `left`. This can save you from the tedious process of defining these properties individually, as you can use `inset` to set them all at once.
```html
<div class="box"></div>
```
... | [What is the `inset` property?]
## What is the `inset` property?
The `inset` property is a **shorthand** for `top`, `right`, `bottom`, and `left`. This can save you from the tedious process of defining these properties individually, as you can use `inset` to set them all at once.
```html
<div class="box"></div>
```
... | code_snippets | ||
9a901449-7473-455e-9252-8d48e0ef81f2 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/css/s/inset.md | unknown | 305da8b9-ab18-4686-ac77-1bc465e2d6f5 | 6 | SemanticChunker@1.0.0 | b1a2122b7c3875ee0b8b940069f3206fd171eb2ffc0335196df465485748812f | [Practical use cases > Custom positioning]
### Custom positioning
You can also use `inset` with custom values to position an element in a specific way, leveraging the `auto` keyword to essentially skip some sides. For example, if you want to position an element `10px` from the `top` and `50px` from the `left`, you ca... | unknown | unknown | [Practical use cases > Custom positioning]
### Custom positioning
You can also use `inset` with custom values to position an element in a specific way, leveraging the `auto` keyword to essentially skip some sides. For example, if you want to position an element `10px` from the `top` and `50px` from the `left`, you ca... | [Practical use cases > Custom positioning]
### Custom positioning
You can also use `inset` with custom values to position an element in a specific way, leveraging the `auto` keyword to essentially skip some sides. For example, if you want to position an element `10px` from the `top` and `50px` from the `left`, you ca... | code_snippets | ||
e68c3ba8-43fe-4191-b4ab-801c62b4c600 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/css/s/inset.md | unknown | 305da8b9-ab18-4686-ac77-1bc465e2d6f5 | 0 | SemanticChunker@1.0.0 | f9909fcc3786e093756de0458841da866b0c76e41b26a878c21aaef1877594cc | ---
title: Using the inset CSS property
shortTitle: Using inset
language: css
tags: [layout]
cover: yellow-white-mug-1
excerpt: The inset shorthand property makes element positioning in CSS easier. Learn how to use it effectively in your projects.
listed: true
dateModified: 2025-05-15
---
A few months back, I learned ... | unknown | unknown | ---
title: Using the inset CSS property
shortTitle: Using inset
language: css
tags: [layout]
cover: yellow-white-mug-1
excerpt: The inset shorthand property makes element positioning in CSS easier. Learn how to use it effectively in your projects.
listed: true
dateModified: 2025-05-15
---
A few months back, I learned ... | ---
title: Using the inset CSS property
shortTitle: Using inset
language: css
tags: [layout]
cover: yellow-white-mug-1
excerpt: The inset shorthand property makes element positioning in CSS easier. Learn how to use it effectively in your projects.
listed: true
dateModified: 2025-05-15
---
A few months back, I learned ... | code_snippets | ||
47027c35-6c67-4a9e-a7b0-ce0c99f12387 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/css/s/perfect-transition-duration.md | unknown | cee17c4b-103d-4d91-ad72-feadfcd156c7 | 0 | SemanticChunker@1.0.0 | 9ff4467d5c63012a254ef512c0e8fae769bba2ad9d8c1bed9e3e02148d5bcaaa | ---
title: The perfect duration for CSS transitions
shortTitle: CSS transition duration
language: css
tags: [interactivity,visual,animation]
cover: perfect-timing
excerpt: Learn how to make your CSS transitions feel perfect when users interact with elements on the page with this simple tip.
listed: true
dateModified: 2... | unknown | unknown | ---
title: The perfect duration for CSS transitions
shortTitle: CSS transition duration
language: css
tags: [interactivity,visual,animation]
cover: perfect-timing
excerpt: Learn how to make your CSS transitions feel perfect when users interact with elements on the page with this simple tip.
listed: true
dateModified: 2... | ---
title: The perfect duration for CSS transitions
shortTitle: CSS transition duration
language: css
tags: [interactivity,visual,animation]
cover: perfect-timing
excerpt: Learn how to make your CSS transitions feel perfect when users interact with elements on the page with this simple tip.
listed: true
dateModified: 2... | code_snippets | ||
20e7b984-feec-4729-8792-1df43025b852 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/css/s/input-with-prefix.md | unknown | 32b5c178-2de8-4644-9ed9-b8470a9c21db | 0 | SemanticChunker@1.0.0 | bf5471e0b296f6f311fc324b306661b9d9106e45becd2da4624206eea1a43c8c | ---
title: Input with prefix
language: css
tags: [interactivity,visual]
cover: flower-portrait-4
excerpt: Ever wanted to create an input with a visual, non-editable prefix? CSS can help you with that!
listed: true
dateModified: 2024-08-30
---
Ever wanted to create an input with a visual, **non-editable prefix**? HTML,... | unknown | unknown | ---
title: Input with prefix
language: css
tags: [interactivity,visual]
cover: flower-portrait-4
excerpt: Ever wanted to create an input with a visual, non-editable prefix? CSS can help you with that!
listed: true
dateModified: 2024-08-30
---
Ever wanted to create an input with a visual, **non-editable prefix**? HTML,... | ---
title: Input with prefix
language: css
tags: [interactivity,visual]
cover: flower-portrait-4
excerpt: Ever wanted to create an input with a visual, non-editable prefix? CSS can help you with that!
listed: true
dateModified: 2024-08-30
---
Ever wanted to create an input with a visual, **non-editable prefix**? HTML,... | code_snippets | ||
05a419cf-e697-4f42-b487-c542a6f5b763 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/css/s/loaders.md | unknown | 63cb8d77-fa00-4787-bda9-4988e16587c6 | 3 | SemanticChunker@1.0.0 | c74cb75f15034f1148cdb65c7ef88b236e772f6f5a291df4e7a552e21bc38c7e | [Bouncing ball loader > Donut spinner]
## Donut spinner
For the donut spinner, you'll need a single element. Use a semi-transparent `border` for the whole element. Exclude one side that will serve as the loading indicator for the donut. Define and use an appropriate animation, using `transform: rotate()` to rotate th... | unknown | unknown | [Bouncing ball loader > Donut spinner]
## Donut spinner
For the donut spinner, you'll need a single element. Use a semi-transparent `border` for the whole element. Exclude one side that will serve as the loading indicator for the donut. Define and use an appropriate animation, using `transform: rotate()` to rotate th... | [Bouncing ball loader > Donut spinner]
## Donut spinner
For the donut spinner, you'll need a single element. Use a semi-transparent `border` for the whole element. Exclude one side that will serve as the loading indicator for the donut. Define and use an appropriate animation, using `transform: rotate()` to rotate th... | code_snippets | ||
cc43fbed-479e-4600-bf3d-901de9511739 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/css/s/loaders.md | unknown | 63cb8d77-fa00-4787-bda9-4988e16587c6 | 1 | SemanticChunker@1.0.0 | e9541a5da0803a48e70d3fabc7ed91b986119b5431dd94977657d6a6b0f9e275 | [Bouncing ball loader]
## Bouncing ball loader
For the bouncing loader, you'll need a parent with three elements, one for each ball. Use `@keyframes` to define a bouncing animation, using the `opacity` and `transform` properties. Use a single axis translation on `transform: translate3d()` to achieve better animation ... | unknown | unknown | [Bouncing ball loader]
## Bouncing ball loader
For the bouncing loader, you'll need a parent with three elements, one for each ball. Use `@keyframes` to define a bouncing animation, using the `opacity` and `transform` properties. Use a single axis translation on `transform: translate3d()` to achieve better animation ... | [Bouncing ball loader]
## Bouncing ball loader
For the bouncing loader, you'll need a parent with three elements, one for each ball. Use `@keyframes` to define a bouncing animation, using the `opacity` and `transform` properties. Use a single axis translation on `transform: translate3d()` to achieve better animation ... | code_snippets | ||
cee248a4-1740-412d-a882-30c39542d363 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/css/s/loaders.md | unknown | 63cb8d77-fa00-4787-bda9-4988e16587c6 | 0 | SemanticChunker@1.0.0 | 6c106eab87d87b8209c15a4f0a6c4bb2ae5e54efe357a198390523a1f7cb0138 | ---
title: Animated CSS loaders
shortTitle: Animated loaders
language: css
tags: [animation]
cover: digital-nomad-12
excerpt: Loading indicators are a staple of modern web design. Here are some CSS loaders to keep your users engaged while they wait.
listed: true
dateModified: 2024-09-02
---
Loading indicators are a st... | unknown | unknown | ---
title: Animated CSS loaders
shortTitle: Animated loaders
language: css
tags: [animation]
cover: digital-nomad-12
excerpt: Loading indicators are a staple of modern web design. Here are some CSS loaders to keep your users engaged while they wait.
listed: true
dateModified: 2024-09-02
---
Loading indicators are a st... | ---
title: Animated CSS loaders
shortTitle: Animated loaders
language: css
tags: [animation]
cover: digital-nomad-12
excerpt: Loading indicators are a staple of modern web design. Here are some CSS loaders to keep your users engaged while they wait.
listed: true
dateModified: 2024-09-02
---
Loading indicators are a st... | code_snippets | ||
e2eb86a8-64c7-4241-b4a0-338df1369311 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/css/s/loaders.md | unknown | 63cb8d77-fa00-4787-bda9-4988e16587c6 | 2 | SemanticChunker@1.0.0 | 8f2fcb50e03cfcbd8bd92ef167355f81a3b9192db7bf215037b0f8c0bc1a78af | [Bouncing ball loader > Pulse loader]
## Pulse loader
For the pulse loader, you'll need a parent container with two child elements, one for each ring. Use `@keyframes` to define an animation at two points in the cycle. At the start (`0%`), the two child elements have no `width` or `height` and are positioned at the c... | unknown | unknown | [Bouncing ball loader > Pulse loader]
## Pulse loader
For the pulse loader, you'll need a parent container with two child elements, one for each ring. Use `@keyframes` to define an animation at two points in the cycle. At the start (`0%`), the two child elements have no `width` or `height` and are positioned at the c... | [Bouncing ball loader > Pulse loader]
## Pulse loader
For the pulse loader, you'll need a parent container with two child elements, one for each ring. Use `@keyframes` to define an animation at two points in the cycle. At the start (`0%`), the two child elements have no `width` or `height` and are positioned at the c... | code_snippets | ||
62fdda48-5af9-4eef-a942-a97b569143a6 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/css/s/select-any-link.md | unknown | 9dec5a41-3704-4b10-8d75-638390e6bfcd | 0 | SemanticChunker@1.0.0 | dbab284a31a9d6cddcbb9d234eface16dbcef32228f45a3131afcb0005e54bc0 | ---
title: Select any link with CSS
shortTitle: "CSS :any-link pseudo-class"
language: css
tags: [visual,interactivity]
cover: round-leaves
excerpt: You can use a CSS pseudo-class selector to style all links in a page, without worrying if they have been visited or not.
listed: true
dateModified: 2022-03-06
---
Styling... | unknown | unknown | ---
title: Select any link with CSS
shortTitle: "CSS :any-link pseudo-class"
language: css
tags: [visual,interactivity]
cover: round-leaves
excerpt: You can use a CSS pseudo-class selector to style all links in a page, without worrying if they have been visited or not.
listed: true
dateModified: 2022-03-06
---
Styling... | ---
title: Select any link with CSS
shortTitle: "CSS :any-link pseudo-class"
language: css
tags: [visual,interactivity]
cover: round-leaves
excerpt: You can use a CSS pseudo-class selector to style all links in a page, without worrying if they have been visited or not.
listed: true
dateModified: 2022-03-06
---
Styling... | code_snippets | ||
665f4eb6-038f-4121-8853-05c39cda288b | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/css/s/root-vs-html.md | unknown | e98394f7-1fd0-4c7c-9dd8-b6ed5fb8ecbb | 1 | SemanticChunker@1.0.0 | eed1bf5dd6d861bfce7c9132b9157e2ccd6b45ed00f6eb6039eb2b19697d2413 | [Selector specificity]
## Selector specificity
The `:root` selector has a higher specificity than the `html` selector. This is because `:root` is a pseudo-class selector, while `html` is a type selector.
```css
:root {
background-color: red;
}
html {
background-color: blue;
}
/* The HTML document's root element ... | unknown | unknown | [Selector specificity]
## Selector specificity
The `:root` selector has a higher specificity than the `html` selector. This is because `:root` is a pseudo-class selector, while `html` is a type selector.
```css
:root {
background-color: red;
}
html {
background-color: blue;
}
/* The HTML document's root element ... | [Selector specificity]
## Selector specificity
The `:root` selector has a higher specificity than the `html` selector. This is because `:root` is a pseudo-class selector, while `html` is a type selector.
```css
:root {
background-color: red;
}
html {
background-color: blue;
}
/* The HTML document's root element ... | code_snippets | ||
c154a3f4-719e-490f-8de0-63f3e8ac4be2 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/css/s/root-vs-html.md | unknown | e98394f7-1fd0-4c7c-9dd8-b6ed5fb8ecbb | 2 | SemanticChunker@1.0.0 | ee9bd0b7f86a83b51dfadce0da66c5fc781bd22154548208f7c159878d8e7d06 | [Selector specificity > Targeting the root element]
## Targeting the root element
CSS can be used to style other types of documents, apart from HTML. This is where the `:root` element comes in to play, allowing you to style the root element of a document. This can be especially important when styling SVG documents, w... | unknown | unknown | [Selector specificity > Targeting the root element]
## Targeting the root element
CSS can be used to style other types of documents, apart from HTML. This is where the `:root` element comes in to play, allowing you to style the root element of a document. This can be especially important when styling SVG documents, w... | [Selector specificity > Targeting the root element]
## Targeting the root element
CSS can be used to style other types of documents, apart from HTML. This is where the `:root` element comes in to play, allowing you to style the root element of a document. This can be especially important when styling SVG documents, w... | code_snippets | ||
d9e7423b-5b77-4508-832e-422802f969a5 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/css/s/root-vs-html.md | unknown | e98394f7-1fd0-4c7c-9dd8-b6ed5fb8ecbb | 0 | SemanticChunker@1.0.0 | 3b70fb906c9ac3d6070ea16a43a44d38f27be1e251b068a486ddd0f715236af7 | ---
title: What's the difference between :root and html in CSS?
shortTitle: :root vs html
language: css
tags: [layout,selector]
cover: tree-roots
excerpt: The CSS selectors used to target the root element of an HTML share some similarities, but they also have some differences.
listed: true
dateModified: 2022-05-22
---
... | unknown | unknown | ---
title: What's the difference between :root and html in CSS?
shortTitle: :root vs html
language: css
tags: [layout,selector]
cover: tree-roots
excerpt: The CSS selectors used to target the root element of an HTML share some similarities, but they also have some differences.
listed: true
dateModified: 2022-05-22
---
... | ---
title: What's the difference between :root and html in CSS?
shortTitle: :root vs html
language: css
tags: [layout,selector]
cover: tree-roots
excerpt: The CSS selectors used to target the root element of an HTML share some similarities, but they also have some differences.
listed: true
dateModified: 2022-05-22
---
... | code_snippets | ||
af9de254-f114-4cc7-bcca-9d7f0fcd1b95 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/css/s/responsive-favicon-dark-mode.md | unknown | 71c594b4-7ec7-4c26-b96a-81636499ec90 | 1 | SemanticChunker@1.0.0 | 23325ece864dc0bf4d22205c6851d9dadcb7d416341de39db4bea12dd2a41c8f | After creating the SVG asset, you need only include the custom SVG favicon in the page's `<head>` element and you're ready to go. Be sure to include a PNG fallback, if possible, with a rendered version of the icon in either palette:
```html
<head>
<!-- Provided you have a rendered PNG fallback named favicon.png -->
... | unknown | unknown | After creating the SVG asset, you need only include the custom SVG favicon in the page's `<head>` element and you're ready to go. Be sure to include a PNG fallback, if possible, with a rendered version of the icon in either palette:
```html
<head>
<!-- Provided you have a rendered PNG fallback named favicon.png -->
... | After creating the SVG asset, you need only include the custom SVG favicon in the page's `<head>` element and you're ready to go. Be sure to include a PNG fallback, if possible, with a rendered version of the icon in either palette:
```html
<head>
<!-- Provided you have a rendered PNG fallback named favicon.png -->
... | code_snippets | ||
be72bf91-49d7-47e8-9f3e-15bbc4b82413 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/css/s/responsive-favicon-dark-mode.md | unknown | 71c594b4-7ec7-4c26-b96a-81636499ec90 | 0 | SemanticChunker@1.0.0 | 784a18d53882660ad8b26008e3a92106a52ef26294b4a8d94767cd6c800558d3 | ---
title: How can I create a custom responsive favicon for dark mode?
shortTitle: Responsive dark mode favicon
language: css
tags: [visual]
cover: dark-mode
excerpt: Learn how to create a custom responsive favicon that can adapt its color palette for dark mode with this quick guide.
listed: true
dateModified: 2021-09-... | unknown | unknown | ---
title: How can I create a custom responsive favicon for dark mode?
shortTitle: Responsive dark mode favicon
language: css
tags: [visual]
cover: dark-mode
excerpt: Learn how to create a custom responsive favicon that can adapt its color palette for dark mode with this quick guide.
listed: true
dateModified: 2021-09-... | ---
title: How can I create a custom responsive favicon for dark mode?
shortTitle: Responsive dark mode favicon
language: css
tags: [visual]
cover: dark-mode
excerpt: Learn how to create a custom responsive favicon that can adapt its color palette for dark mode with this quick guide.
listed: true
dateModified: 2021-09-... | code_snippets | ||
5a743779-de18-4ff0-9285-f191ceb42609 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/css/s/reset.md | unknown | 38b68419-6bb5-4029-b318-2e96746de287 | 1 | SemanticChunker@1.0.0 | b84bbdff22f6101787972b44becc6875fe731b0090eac519a03a3c7b5e6eae32 | - `html`:
- `max-width` - Use `ch` units to set the maximum width in the middle of the optimal readable range (60-80 characters).
- `margin` - Center content on the page.
- `padding` - Prevent edge-to-edge text on smaller viewports.
- `font-family` - Use the [system font stack](/css/s/system-font-stack) to ensure t... | unknown | unknown | - `html`:
- `max-width` - Use `ch` units to set the maximum width in the middle of the optimal readable range (60-80 characters).
- `margin` - Center content on the page.
- `padding` - Prevent edge-to-edge text on smaller viewports.
- `font-family` - Use the [system font stack](/css/s/system-font-stack) to ensure t... | - `html`:
- `max-width` - Use `ch` units to set the maximum width in the middle of the optimal readable range (60-80 characters).
- `margin` - Center content on the page.
- `padding` - Prevent edge-to-edge text on smaller viewports.
- `font-family` - Use the [system font stack](/css/s/system-font-stack) to ensure t... | code_snippets | ||
8ff08d94-3ca6-44a8-aba0-ad2f96815c8b | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/css/s/reset.md | unknown | 38b68419-6bb5-4029-b318-2e96746de287 | 0 | SemanticChunker@1.0.0 | f27afbfcc3c5b3815079e9d8456957713cbaa383d66186e4d3284f9ecc43cfa5 | ---
title: CSS Reset
language: css
tags: [visual]
cover: bridge-over-road
excerpt: A short, opinionated CSS reset to make your websites look great everywhere.
listed: true
dateModified: 2022-10-16
---
Browsers nowadays are much better at presenting HTML in a consistent manner, making CSS resets of the past largely unn... | unknown | unknown | ---
title: CSS Reset
language: css
tags: [visual]
cover: bridge-over-road
excerpt: A short, opinionated CSS reset to make your websites look great everywhere.
listed: true
dateModified: 2022-10-16
---
Browsers nowadays are much better at presenting HTML in a consistent manner, making CSS resets of the past largely unn... | ---
title: CSS Reset
language: css
tags: [visual]
cover: bridge-over-road
excerpt: A short, opinionated CSS reset to make your websites look great everywhere.
listed: true
dateModified: 2022-10-16
---
Browsers nowadays are much better at presenting HTML in a consistent manner, making CSS resets of the past largely unn... | code_snippets | ||
fd2eb3af-a35f-432d-b1ae-2cb63842d2d4 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/css/s/scroll-progress-bar.md | unknown | 31c9bbf7-7536-4618-ac61-d9fc8bbc9009 | 0 | SemanticChunker@1.0.0 | f2554e2eced1e854c818a9c6f399f72f394c4fc081805b29feeb3788f468cc35 | ---
title: Scroll progress bar
language: css
tags: [animation,visual]
cover: coworking-space
excerpt: Create a progress bar indicating the scroll percentage of the page, using CSS and JavaScript.
listed: true
dateModified: 2024-09-22
---
Horizontal progress-style scroll bars are a fairly new trend in web design. They ... | unknown | unknown | ---
title: Scroll progress bar
language: css
tags: [animation,visual]
cover: coworking-space
excerpt: Create a progress bar indicating the scroll percentage of the page, using CSS and JavaScript.
listed: true
dateModified: 2024-09-22
---
Horizontal progress-style scroll bars are a fairly new trend in web design. They ... | ---
title: Scroll progress bar
language: css
tags: [animation,visual]
cover: coworking-space
excerpt: Create a progress bar indicating the scroll percentage of the page, using CSS and JavaScript.
listed: true
dateModified: 2024-09-22
---
Horizontal progress-style scroll bars are a fairly new trend in web design. They ... | code_snippets | ||
273f530b-f7f9-4b04-870a-6c0c2c99d2dd | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/css/s/reset-all-styles.md | unknown | 8b1518c5-406d-4907-b3fa-476686c638ad | 0 | SemanticChunker@1.0.0 | 954ff664d29f41fa59c7f5fb55c4e4f43c5bcf7085d4961779a0fa12d665ffe5 | ---
title: How can I reset all styles on an element?
shortTitle: Reset all styles
language: css
tags: [visual]
cover: rocky-beach-2
excerpt: Have you ever needed to reset all styles previously applied to a selector to their default values? CSS has the tool just for you!
listed: true
dateModified: 2024-08-15
---
Have y... | unknown | unknown | ---
title: How can I reset all styles on an element?
shortTitle: Reset all styles
language: css
tags: [visual]
cover: rocky-beach-2
excerpt: Have you ever needed to reset all styles previously applied to a selector to their default values? CSS has the tool just for you!
listed: true
dateModified: 2024-08-15
---
Have y... | ---
title: How can I reset all styles on an element?
shortTitle: Reset all styles
language: css
tags: [visual]
cover: rocky-beach-2
excerpt: Have you ever needed to reset all styles previously applied to a selector to their default values? CSS has the tool just for you!
listed: true
dateModified: 2024-08-15
---
Have y... | code_snippets | ||
26c66637-e5e9-49e0-b514-c1578b7a697a | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/css/s/pseudo-classes.md | unknown | c17cd14b-c7f8-42cd-979f-1399ef7e652b | 0 | SemanticChunker@1.0.0 | d6bd6793f03b2a69e803f65b112e027cd37d893dcb1f3adad99478397158e8c8 | ---
title: What are CSS pseudo-classes?
shortTitle: CSS pseudo-classes
language: css
tags: [webdev]
cover: orange-flower
excerpt: Learn how to use CSS pseudo-classes to style an element based on changes to its state.
listed: true
dateModified: 2021-11-07
---
CSS pseudo-classes provide a way to style elements, based on... | unknown | unknown | ---
title: What are CSS pseudo-classes?
shortTitle: CSS pseudo-classes
language: css
tags: [webdev]
cover: orange-flower
excerpt: Learn how to use CSS pseudo-classes to style an element based on changes to its state.
listed: true
dateModified: 2021-11-07
---
CSS pseudo-classes provide a way to style elements, based on... | ---
title: What are CSS pseudo-classes?
shortTitle: CSS pseudo-classes
language: css
tags: [webdev]
cover: orange-flower
excerpt: Learn how to use CSS pseudo-classes to style an element based on changes to its state.
listed: true
dateModified: 2021-11-07
---
CSS pseudo-classes provide a way to style elements, based on... | code_snippets | ||
54a57a57-75df-4ab6-b6fd-9ce4f53a3f9a | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/css/s/pseudo-classes.md | unknown | c17cd14b-c7f8-42cd-979f-1399ef7e652b | 1 | SemanticChunker@1.0.0 | 33716c99b56e14d478d489607bd7e0f301d0931b5e4ad08c23a5170cd3fa8ba8 | [Commonly used pseudo-classes]
## Commonly used pseudo-classes
Below is a list of the top 5 most commonly used pseudo-classes and their usage. This list is by no means complete. You should always refer to relevant documentation from authoritative sources, such as [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS... | unknown | unknown | [Commonly used pseudo-classes]
## Commonly used pseudo-classes
Below is a list of the top 5 most commonly used pseudo-classes and their usage. This list is by no means complete. You should always refer to relevant documentation from authoritative sources, such as [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS... | [Commonly used pseudo-classes]
## Commonly used pseudo-classes
Below is a list of the top 5 most commonly used pseudo-classes and their usage. This list is by no means complete. You should always refer to relevant documentation from authoritative sources, such as [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS... | code_snippets | ||
5ef62576-e707-4b12-a781-41aee23e74c5 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/css/s/shake-invalid-input.md | unknown | 92fc7862-8b5c-4222-8e22-f4e07dcddea1 | 0 | SemanticChunker@1.0.0 | 30015e2601f9b250d25b9eff95cff19e087fc5929b17786670ac424fc67fbd70 | ---
title: Shake input field when invalid, using CSS
shortTitle: Shake on invalid input
language: css
tags: [animation]
cover: perfect-timing
excerpt: Inform your users of invalid input by shaking the input field.
listed: true
dateModified: 2024-08-31
---
One of the most common **feedback** animations is shaking an in... | unknown | unknown | ---
title: Shake input field when invalid, using CSS
shortTitle: Shake on invalid input
language: css
tags: [animation]
cover: perfect-timing
excerpt: Inform your users of invalid input by shaking the input field.
listed: true
dateModified: 2024-08-31
---
One of the most common **feedback** animations is shaking an in... | ---
title: Shake input field when invalid, using CSS
shortTitle: Shake on invalid input
language: css
tags: [animation]
cover: perfect-timing
excerpt: Inform your users of invalid input by shaking the input field.
listed: true
dateModified: 2024-08-31
---
One of the most common **feedback** animations is shaking an in... | code_snippets | ||
82377c42-1955-4c19-83f9-4781a3e2b542 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/css/s/print-stylesheet.md | unknown | 2c0f74dd-3701-4dec-9124-c98121a5b7e0 | 0 | SemanticChunker@1.0.0 | bfbc8f3bcd7d726315b30bf31a9efa2b30469d66d1a9d479477916b65550510b | ---
title: CSS Print Stylesheet
language: css
tags: [visual]
cover: cozy-desk-setup
excerpt: A short opinionated print stylesheet to make your websites look great on paper.
listed: true
dateModified: 2023-06-11
---
While it's not that often we physically print content from the web, **print stylesheets shouldn't be ove... | unknown | unknown | ---
title: CSS Print Stylesheet
language: css
tags: [visual]
cover: cozy-desk-setup
excerpt: A short opinionated print stylesheet to make your websites look great on paper.
listed: true
dateModified: 2023-06-11
---
While it's not that often we physically print content from the web, **print stylesheets shouldn't be ove... | ---
title: CSS Print Stylesheet
language: css
tags: [visual]
cover: cozy-desk-setup
excerpt: A short opinionated print stylesheet to make your websites look great on paper.
listed: true
dateModified: 2023-06-11
---
While it's not that often we physically print content from the web, **print stylesheets shouldn't be ove... | code_snippets | ||
a1d2a8ee-f06b-477d-87e9-a499e82aa11a | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/css/s/print-stylesheet.md | unknown | 2c0f74dd-3701-4dec-9124-c98121a5b7e0 | 1 | SemanticChunker@1.0.0 | ddfeaa701e82a48d7ca01c86526d5def35367f5945448fb1028f74000e4ad2d7 | - `@media print` - The print media query is used to apply styles when the page is printed.
- `@page`:
- `size` - Specify the page size.
- `body`:
- `margin` - Remove the default margin.
- `padding` - Remove the default padding.
- `body, p, h1, h2, h3, h4, h5, h6, li`:
- `font-family` - Use print-friendly fonts.
- ... | unknown | unknown | - `@media print` - The print media query is used to apply styles when the page is printed.
- `@page`:
- `size` - Specify the page size.
- `body`:
- `margin` - Remove the default margin.
- `padding` - Remove the default padding.
- `body, p, h1, h2, h3, h4, h5, h6, li`:
- `font-family` - Use print-friendly fonts.
- ... | - `@media print` - The print media query is used to apply styles when the page is printed.
- `@page`:
- `size` - Specify the page size.
- `body`:
- `margin` - Remove the default margin.
- `padding` - Remove the default padding.
- `body, p, h1, h2, h3, h4, h5, h6, li`:
- `font-family` - Use print-friendly fonts.
- ... | code_snippets | ||
38e4a75a-651d-44d7-88ce-162003d2024d | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/css/s/scroll-snap.md | unknown | bc160386-db4d-4596-8720-90a33f3df5a8 | 2 | SemanticChunker@1.0.0 | f6fcb8a997fdedbcea1c2765085105557db0dc3e12877e523a15edc82ba9ebb9 | [Scrollable containers that snap > Snap alignment]
### Snap alignment
You can also control the **alignment of the snap points** using the `scroll-snap-align` property. This property can be set to `start`, `end`, `center`, or `none`.
```css
/* Snap to the start of the element */
.scroll-snap > .element {
scroll-snap... | unknown | unknown | [Scrollable containers that snap > Snap alignment]
### Snap alignment
You can also control the **alignment of the snap points** using the `scroll-snap-align` property. This property can be set to `start`, `end`, `center`, or `none`.
```css
/* Snap to the start of the element */
.scroll-snap > .element {
scroll-snap... | [Scrollable containers that snap > Snap alignment]
### Snap alignment
You can also control the **alignment of the snap points** using the `scroll-snap-align` property. This property can be set to `start`, `end`, `center`, or `none`.
```css
/* Snap to the start of the element */
.scroll-snap > .element {
scroll-snap... | code_snippets | ||
39f687cc-8838-4a58-a385-3ebaebb7bf75 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/css/s/scroll-snap.md | unknown | bc160386-db4d-4596-8720-90a33f3df5a8 | 1 | SemanticChunker@1.0.0 | 1c17ba8587d46c412bf7ed36c0d5cb25d43e22667812de767f785280f6ac4336 | [Scrollable containers that snap]
## Scrollable containers that snap
To create a scrollable container that snaps on elements when scrolling, you can use the `scroll-snap-type` property to control the **snap axis**. This property can be set to `x` for horizontal scrolling or `y` for vertical scrolling. You can also se... | unknown | unknown | [Scrollable containers that snap]
## Scrollable containers that snap
To create a scrollable container that snaps on elements when scrolling, you can use the `scroll-snap-type` property to control the **snap axis**. This property can be set to `x` for horizontal scrolling or `y` for vertical scrolling. You can also se... | [Scrollable containers that snap]
## Scrollable containers that snap
To create a scrollable container that snaps on elements when scrolling, you can use the `scroll-snap-type` property to control the **snap axis**. This property can be set to `x` for horizontal scrolling or `y` for vertical scrolling. You can also se... | code_snippets | ||
444fc1b4-5bb1-4302-af04-0bd3b57d693f | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/css/s/scroll-snap.md | unknown | bc160386-db4d-4596-8720-90a33f3df5a8 | 3 | SemanticChunker@1.0.0 | ee3f386b1c32561674ce94fdf463577814f2dca0008a95e487232e7da19bae0e | [Snap alignment > Scrolling over the edge]
### Scrolling over the edge
To prevent the default browser **behavior when reaching the end of the scrollable container**, you can use the `overscroll-behavior` property. This property can be set to `auto`, `contain`, or `none`.
The `contain` value is usually preferred as i... | unknown | unknown | [Snap alignment > Scrolling over the edge]
### Scrolling over the edge
To prevent the default browser **behavior when reaching the end of the scrollable container**, you can use the `overscroll-behavior` property. This property can be set to `auto`, `contain`, or `none`.
The `contain` value is usually preferred as i... | [Snap alignment > Scrolling over the edge]
### Scrolling over the edge
To prevent the default browser **behavior when reaching the end of the scrollable container**, you can use the `overscroll-behavior` property. This property can be set to `auto`, `contain`, or `none`.
The `contain` value is usually preferred as i... | code_snippets | ||
4b045198-c064-43c7-9e47-a4831d7f2245 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/css/s/scroll-snap.md | unknown | bc160386-db4d-4596-8720-90a33f3df5a8 | 0 | SemanticChunker@1.0.0 | a4f5d72dc6826d4236087d6347d7117bc75653b5a3cca258f33266e6a10e63b2 | ---
title: Horizontal or vertical scroll snap in CSS
shortTitle: Horizontal or vertical scroll snap
language: css
tags: [interactivity]
cover: purple-sunset-waves
excerpt: Create a horizontally or vertically scrollable container that will snap on elements when scrolling.
listed: true
dateModified: 2024-08-25
---
Scrol... | unknown | unknown | ---
title: Horizontal or vertical scroll snap in CSS
shortTitle: Horizontal or vertical scroll snap
language: css
tags: [interactivity]
cover: purple-sunset-waves
excerpt: Create a horizontally or vertically scrollable container that will snap on elements when scrolling.
listed: true
dateModified: 2024-08-25
---
Scrol... | ---
title: Horizontal or vertical scroll snap in CSS
shortTitle: Horizontal or vertical scroll snap
language: css
tags: [interactivity]
cover: purple-sunset-waves
excerpt: Create a horizontally or vertically scrollable container that will snap on elements when scrolling.
listed: true
dateModified: 2024-08-25
---
Scrol... | code_snippets | ||
768c9a9b-45fd-404b-9b5a-c34a63815835 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/css/s/scroll-snap.md | unknown | bc160386-db4d-4596-8720-90a33f3df5a8 | 4 | SemanticChunker@1.0.0 | ba74fb59891e90a0e89783b4e8f805820a4179a775b15483bc3a6f010c7046dd | [Scrollable containers that snap > Horizontal scroll snap]
## Horizontal scroll snap
Putting everything together, we can create a horizontally scrollable container that will snap on elements when scrolling. At its core the HTML and CSS is quite simple. All you need to do is set the `scroll-snap-type` to `x mandatory`... | unknown | unknown | [Scrollable containers that snap > Horizontal scroll snap]
## Horizontal scroll snap
Putting everything together, we can create a horizontally scrollable container that will snap on elements when scrolling. At its core the HTML and CSS is quite simple. All you need to do is set the `scroll-snap-type` to `x mandatory`... | [Scrollable containers that snap > Horizontal scroll snap]
## Horizontal scroll snap
Putting everything together, we can create a horizontally scrollable container that will snap on elements when scrolling. At its core the HTML and CSS is quite simple. All you need to do is set the `scroll-snap-type` to `x mandatory`... | code_snippets | ||
c4499a36-5ec4-4c26-a13a-e2dafc822e45 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/css/s/scroll-snap.md | unknown | bc160386-db4d-4596-8720-90a33f3df5a8 | 5 | SemanticChunker@1.0.0 | 37752e877b3dfd33196afea24bba3b9a5e1edf9ae4680e0f228f741335ebbdfc | [Scrollable containers that snap > Vertical scroll snap]
## Vertical scroll snap
Similarly, a vertically scrollable container that snaps on elements when scrolling can be created by setting the `scroll-snap-type` to `y mandatory` and the `overscroll-behavior-y` to `contain`. You can again decide the value of `scroll-... | unknown | unknown | [Scrollable containers that snap > Vertical scroll snap]
## Vertical scroll snap
Similarly, a vertically scrollable container that snaps on elements when scrolling can be created by setting the `scroll-snap-type` to `y mandatory` and the `overscroll-behavior-y` to `contain`. You can again decide the value of `scroll-... | [Scrollable containers that snap > Vertical scroll snap]
## Vertical scroll snap
Similarly, a vertically scrollable container that snaps on elements when scrolling can be created by setting the `scroll-snap-type` to `y mandatory` and the `overscroll-behavior-y` to `contain`. You can again decide the value of `scroll-... | code_snippets | ||
305f4627-af98-442f-9c3c-bb3dfbdc813f | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/css/s/style-default-links.md | unknown | f385b3d2-2677-445f-a3dc-8c94d2f05066 | 0 | SemanticChunker@1.0.0 | 71990cf1476d5cdc169c145088285068b063f6d1f39f0fe67b966a6daaee9262 | ---
title: Style links without a class
shortTitle: Style default links
language: css
tags: [visual,interactivity]
cover: citrus-drink
excerpt: A short summary of your story up to 180 characters long.
listed: true
dateModified: 2022-11-23
---
When styling injected or generated HTML content, you might not have access to... | unknown | unknown | ---
title: Style links without a class
shortTitle: Style default links
language: css
tags: [visual,interactivity]
cover: citrus-drink
excerpt: A short summary of your story up to 180 characters long.
listed: true
dateModified: 2022-11-23
---
When styling injected or generated HTML content, you might not have access to... | ---
title: Style links without a class
shortTitle: Style default links
language: css
tags: [visual,interactivity]
cover: citrus-drink
excerpt: A short summary of your story up to 180 characters long.
listed: true
dateModified: 2022-11-23
---
When styling injected or generated HTML content, you might not have access to... | code_snippets | ||
7244711f-9f96-4d58-9aed-e20ebb51c1c0 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/css/s/staggered-animation.md | unknown | 6119bb2e-f822-4db6-8382-53a3b0500440 | 1 | SemanticChunker@1.0.0 | 224a3b298ad45a406e9b81dc57bbecbba7e2751ee2c0b107195f5c479c42b112 | ```css
.container {
overflow-x: hidden;
width: 100%;
}
.menu-toggler {
display: none;
}
.stagger-menu li {
opacity: 0;
transform: translateX(100%);
transition-property: opacity, transform;
transition-duration: 0.3s;
transition-timing-function: cubic-bezier(0.750, -0.015, 0.565, 1.055);
}
.menu-toggler:checke... | unknown | unknown | ```css
.container {
overflow-x: hidden;
width: 100%;
}
.menu-toggler {
display: none;
}
.stagger-menu li {
opacity: 0;
transform: translateX(100%);
transition-property: opacity, transform;
transition-duration: 0.3s;
transition-timing-function: cubic-bezier(0.750, -0.015, 0.565, 1.055);
}
.menu-toggler:checke... | ```css
.container {
overflow-x: hidden;
width: 100%;
}
.menu-toggler {
display: none;
}
.stagger-menu li {
opacity: 0;
transform: translateX(100%);
transition-property: opacity, transform;
transition-duration: 0.3s;
transition-timing-function: cubic-bezier(0.750, -0.015, 0.565, 1.055);
}
.menu-toggler:checke... | code_snippets | ||
85262d89-68d0-4ab7-a9fc-aac34421cad9 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/css/s/staggered-animation.md | unknown | 6119bb2e-f822-4db6-8382-53a3b0500440 | 0 | SemanticChunker@1.0.0 | 72993ccf6d3ce5f103720ac0c2f7fc3afcb990773924730bdc50fa29cbcb9125 | ---
title: Staggered list animation
shortTitle: Staggered animation
language: css
tags: [animation]
cover: aerial-view-port
excerpt: Staggered animations can be used to create a more dynamic user experience. Get creative with your lists!
listed: true
dateModified: 2024-09-01
---
The term **staggered animation** refers... | unknown | unknown | ---
title: Staggered list animation
shortTitle: Staggered animation
language: css
tags: [animation]
cover: aerial-view-port
excerpt: Staggered animations can be used to create a more dynamic user experience. Get creative with your lists!
listed: true
dateModified: 2024-09-01
---
The term **staggered animation** refers... | ---
title: Staggered list animation
shortTitle: Staggered animation
language: css
tags: [animation]
cover: aerial-view-port
excerpt: Staggered animations can be used to create a more dynamic user experience. Get creative with your lists!
listed: true
dateModified: 2024-09-01
---
The term **staggered animation** refers... | code_snippets | ||
82fd6d72-eacd-4bf9-9edd-c27763c44f13 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/css/s/speech-bubble.md | unknown | 700a536d-d8c3-40ea-b1d3-b4ba4e1bd1f1 | 0 | SemanticChunker@1.0.0 | 13e19c64c4fd6d54d76a30a04021383eaeb1cfe2601e2316d895f5cd65fec54d | ---
title: Speech bubbles with CSS
shortTitle: Speech bubbles
language: css
tags: [visual]
cover: greek-coffee
excerpt: Create a content container with a triangle at the top, much like a speech bubble.
listed: true
dateModified: 2024-09-05
---
Speech bubbles have existed in comics for decades, and they are a great way... | unknown | unknown | ---
title: Speech bubbles with CSS
shortTitle: Speech bubbles
language: css
tags: [visual]
cover: greek-coffee
excerpt: Create a content container with a triangle at the top, much like a speech bubble.
listed: true
dateModified: 2024-09-05
---
Speech bubbles have existed in comics for decades, and they are a great way... | ---
title: Speech bubbles with CSS
shortTitle: Speech bubbles
language: css
tags: [visual]
cover: greek-coffee
excerpt: Create a content container with a triangle at the top, much like a speech bubble.
listed: true
dateModified: 2024-09-05
---
Speech bubbles have existed in comics for decades, and they are a great way... | code_snippets | ||
28a0a624-bb1f-414e-834b-3e6553a00108 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/css/s/text-truncation.md | unknown | 81a1f176-0858-4715-8b38-1f213a064604 | 1 | SemanticChunker@1.0.0 | b66b9e0f47e93607b71b7683f1b49b902fbf648cbf369cc2a1275b2cb1b962eb | [Truncate single line text]
## Truncate single line text
**Single line text** can be easily truncated using a couple of CSS fundamentals. First off, you'll need to use `white-space: nowrap` to **prevent the text from wrapping** to the next line. Then, you can use `overflow: hidden` to **hide any overflow**, and `text... | unknown | unknown | [Truncate single line text]
## Truncate single line text
**Single line text** can be easily truncated using a couple of CSS fundamentals. First off, you'll need to use `white-space: nowrap` to **prevent the text from wrapping** to the next line. Then, you can use `overflow: hidden` to **hide any overflow**, and `text... | [Truncate single line text]
## Truncate single line text
**Single line text** can be easily truncated using a couple of CSS fundamentals. First off, you'll need to use `white-space: nowrap` to **prevent the text from wrapping** to the next line. Then, you can use `overflow: hidden` to **hide any overflow**, and `text... | code_snippets | ||
97ad08ea-49b1-46ce-aa9f-de32f92599c6 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/css/s/text-truncation.md | unknown | 81a1f176-0858-4715-8b38-1f213a064604 | 0 | SemanticChunker@1.0.0 | 0c33c18ed83c75e755533eb0af9e07f1cbbbe2a5babbfc89aa9e29786610074d | ---
title: Text truncation, using CSS
shortTitle: Text truncation
language: css
tags: [layout]
cover: houses-rock-sea
excerpt: Truncate both single and multiline text with CSS, adding an ellipsis at the end.
listed: true
dateModified: 2024-08-22
---
Text truncation is a tool that many designs make use of to prevent te... | unknown | unknown | ---
title: Text truncation, using CSS
shortTitle: Text truncation
language: css
tags: [layout]
cover: houses-rock-sea
excerpt: Truncate both single and multiline text with CSS, adding an ellipsis at the end.
listed: true
dateModified: 2024-08-22
---
Text truncation is a tool that many designs make use of to prevent te... | ---
title: Text truncation, using CSS
shortTitle: Text truncation
language: css
tags: [layout]
cover: houses-rock-sea
excerpt: Truncate both single and multiline text with CSS, adding an ellipsis at the end.
listed: true
dateModified: 2024-08-22
---
Text truncation is a tool that many designs make use of to prevent te... | code_snippets | ||
9d242783-8be3-4b8e-9d23-be5ed973c361 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/css/s/text-truncation.md | unknown | 81a1f176-0858-4715-8b38-1f213a064604 | 2 | SemanticChunker@1.0.0 | c677b31f4cff95fd78678d5b9cfdd7e923509f12859b6f76455099c586970373 | [Truncate single line text > Truncate multi line text]
## Truncate multi line text
<baseline-support featureId="line-clamp">
</baseline-support>
For **multi-line text**, you'll still need to use `overflow: hidden` to **prevent the text from overflowing** its container. However, you can't use `text-overflow: ellipsis... | unknown | unknown | [Truncate single line text > Truncate multi line text]
## Truncate multi line text
<baseline-support featureId="line-clamp">
</baseline-support>
For **multi-line text**, you'll still need to use `overflow: hidden` to **prevent the text from overflowing** its container. However, you can't use `text-overflow: ellipsis... | [Truncate single line text > Truncate multi line text]
## Truncate multi line text
<baseline-support featureId="line-clamp">
</baseline-support>
For **multi-line text**, you'll still need to use `overflow: hidden` to **prevent the text from overflowing** its container. However, you can't use `text-overflow: ellipsis... | code_snippets | ||
1d454275-63b0-43a5-837c-ebea575d486a | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/css/s/toggle-switch.md | unknown | 9855a741-ef97-404b-8a25-65dae5bcc6e6 | 0 | SemanticChunker@1.0.0 | 0689db9e31f77b38d8297ab8a47eaa933d8e3cccaab55dbf320e6b636269b013 | ---
title: Create a toggle switch using HTML & CSS
shortTitle: Toggle switch
language: css
tags: [visual,interactivity]
cover: interior-5
excerpt: A toggle switch is little more than a checkbox with a custom appearance. This article shows you how to create one without using JavaScript.
listed: true
dateModified: 2024-0... | unknown | unknown | ---
title: Create a toggle switch using HTML & CSS
shortTitle: Toggle switch
language: css
tags: [visual,interactivity]
cover: interior-5
excerpt: A toggle switch is little more than a checkbox with a custom appearance. This article shows you how to create one without using JavaScript.
listed: true
dateModified: 2024-0... | ---
title: Create a toggle switch using HTML & CSS
shortTitle: Toggle switch
language: css
tags: [visual,interactivity]
cover: interior-5
excerpt: A toggle switch is little more than a checkbox with a custom appearance. This article shows you how to create one without using JavaScript.
listed: true
dateModified: 2024-0... | code_snippets | ||
47e3e125-49fe-497d-b173-abea8349080c | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/css/s/toggle-switch.md | unknown | 9855a741-ef97-404b-8a25-65dae5bcc6e6 | 1 | SemanticChunker@1.0.0 | b215d361d48bb9abc4ba162d03bd6c09d105f71bf6360b4552e22eabcd5af6b6 | > [!TIP]
>
> For **accessibility** reasons, it's important to keep the `<input>` element in the DOM. This way, screen readers can still interact with it, even if it's visually hidden. You might also want to add some `aria-*` attributes to the `<input>` and `<label>` elements to improve accessibility further. | unknown | unknown | > [!TIP]
>
> For **accessibility** reasons, it's important to keep the `<input>` element in the DOM. This way, screen readers can still interact with it, even if it's visually hidden. You might also want to add some `aria-*` attributes to the `<input>` and `<label>` elements to improve accessibility further. | > [!TIP]
>
> For **accessibility** reasons, it's important to keep the `<input>` element in the DOM. This way, screen readers can still interact with it, even if it's visually hidden. You might also want to add some `aria-*` attributes to the `<input>` and `<label>` elements to improve accessibility further. | code_snippets | ||
3487ffd4-a120-4f78-9e38-c5efac9e62f3 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/css/s/text-centering-line-block.md | unknown | 83e7c7ad-fa7c-4732-8ff0-f438f71106df | 2 | SemanticChunker@1.0.0 | 3e1e7b2736daa06bcfcab754ff8030e0f50b0f626cbd02e27c7a497a922cb799 | [`text-align: center` > `align-items: center`]
## `align-items: center`
On the other hand, `align-items` is a property used in **Flexbox** (and Grid) layouts. It aligns the items (child elements) within a flex container along the cross axis (usually vertical, unless the `flex-direction` is changed).
When you use `al... | unknown | unknown | [`text-align: center` > `align-items: center`]
## `align-items: center`
On the other hand, `align-items` is a property used in **Flexbox** (and Grid) layouts. It aligns the items (child elements) within a flex container along the cross axis (usually vertical, unless the `flex-direction` is changed).
When you use `al... | [`text-align: center` > `align-items: center`]
## `align-items: center`
On the other hand, `align-items` is a property used in **Flexbox** (and Grid) layouts. It aligns the items (child elements) within a flex container along the cross axis (usually vertical, unless the `flex-direction` is changed).
When you use `al... | code_snippets | ||
35498dc3-f07e-46b5-b4ac-82f4128d1339 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/css/s/text-centering-line-block.md | unknown | 83e7c7ad-fa7c-4732-8ff0-f438f71106df | 3 | SemanticChunker@1.0.0 | 1948a2bd6450355a3c044e436291560cfbaa6a303aa124ee55aa446a561b0340 | [`text-align: center` > Comparison]
## Comparison
https://codepen.io/chalarangelo/pen/azzOxGX
As demonstrated in the CodePen above, the key difference between the two properties is their scope of influence:
- `text-align: center` affects the **inline content within a block element**.
- `align-items: center` affects... | unknown | unknown | [`text-align: center` > Comparison]
## Comparison
https://codepen.io/chalarangelo/pen/azzOxGX
As demonstrated in the CodePen above, the key difference between the two properties is their scope of influence:
- `text-align: center` affects the **inline content within a block element**.
- `align-items: center` affects... | [`text-align: center` > Comparison]
## Comparison
https://codepen.io/chalarangelo/pen/azzOxGX
As demonstrated in the CodePen above, the key difference between the two properties is their scope of influence:
- `text-align: center` affects the **inline content within a block element**.
- `align-items: center` affects... | code_snippets | ||
b04830ff-701b-4297-b14b-6de37542f073 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/css/s/text-centering-line-block.md | unknown | 83e7c7ad-fa7c-4732-8ff0-f438f71106df | 1 | SemanticChunker@1.0.0 | 10c5eee07593af55b595789889893422d9a395c9aec283ec3dc7efa5e0f33ed9 | [`text-align: center`]
## `text-align: center`
The `text-align` property is used to **align inline content**, such as text, within a block-level element. For example, if you want to center text, you can use `text-align: center` on a paragraph.
```css
p {
/* Centers the text inside the paragraph */
text-align: cent... | unknown | unknown | [`text-align: center`]
## `text-align: center`
The `text-align` property is used to **align inline content**, such as text, within a block-level element. For example, if you want to center text, you can use `text-align: center` on a paragraph.
```css
p {
/* Centers the text inside the paragraph */
text-align: cent... | [`text-align: center`]
## `text-align: center`
The `text-align` property is used to **align inline content**, such as text, within a block-level element. For example, if you want to center text, you can use `text-align: center` on a paragraph.
```css
p {
/* Centers the text inside the paragraph */
text-align: cent... | code_snippets | ||
d4830754-4a84-407e-aa69-988a1227a7cd | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/css/s/text-centering-line-block.md | unknown | 83e7c7ad-fa7c-4732-8ff0-f438f71106df | 0 | SemanticChunker@1.0.0 | f8f3830fe74c191d35094669680325f2103a8e00014bda612161f55649e2d2e3 | ---
title: Are text-align and align-items the same when it comes to text alignment in CSS?
shortTitle: Text-align vs Align-items
language: css
tags: [layout]
cover: sunrise-over-mountains
excerpt: In the age of flexbox and grid, text alignment may seem simpler than ever, but there are a few things you should be aware o... | unknown | unknown | ---
title: Are text-align and align-items the same when it comes to text alignment in CSS?
shortTitle: Text-align vs Align-items
language: css
tags: [layout]
cover: sunrise-over-mountains
excerpt: In the age of flexbox and grid, text alignment may seem simpler than ever, but there are a few things you should be aware o... | ---
title: Are text-align and align-items the same when it comes to text alignment in CSS?
shortTitle: Text-align vs Align-items
language: css
tags: [layout]
cover: sunrise-over-mountains
excerpt: In the age of flexbox and grid, text alignment may seem simpler than ever, but there are a few things you should be aware o... | code_snippets | ||
f2a249c3-301a-4937-8082-49e2bf8eb0ef | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/css/s/text-centering-line-block.md | unknown | 83e7c7ad-fa7c-4732-8ff0-f438f71106df | 4 | SemanticChunker@1.0.0 | 50f3bc103af0047e4a37e30bb5a23331ab0123b01febd3a597f32828f810be28 | [`text-align: center` > Conclusion]
## Conclusion
In summary, while both `text-align` and `align-items` can be used to center content, they serve different purposes and are applied in different contexts. Understanding the distinction between the two will help you create more effective and visually appealing layouts i... | unknown | unknown | [`text-align: center` > Conclusion]
## Conclusion
In summary, while both `text-align` and `align-items` can be used to center content, they serve different purposes and are applied in different contexts. Understanding the distinction between the two will help you create more effective and visually appealing layouts i... | [`text-align: center` > Conclusion]
## Conclusion
In summary, while both `text-align` and `align-items` can be used to center content, they serve different purposes and are applied in different contexts. Understanding the distinction between the two will help you create more effective and visually appealing layouts i... | code_snippets | ||
723d3140-3f1f-4db2-b32a-552afbb9555d | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/css/s/sibling-fade.md | unknown | 1d3d638a-5169-4028-a167-d4de1d019e9a | 0 | SemanticChunker@1.0.0 | a09560d4b6aeb938f35325773b94b350ad06f674ed330bc72570e6a4040d1a8b | ---
title: Fade out siblings on hover
shortTitle: Sibling fade
language: css
tags: [interactivity]
cover: messy-papers
excerpt: Create a cool effect that fades out the siblings of a hovered item with a few lines of CSS.
listed: true
dateModified: 2024-08-28
---
A classic hove effect is to fade out the siblings of an i... | unknown | unknown | ---
title: Fade out siblings on hover
shortTitle: Sibling fade
language: css
tags: [interactivity]
cover: messy-papers
excerpt: Create a cool effect that fades out the siblings of a hovered item with a few lines of CSS.
listed: true
dateModified: 2024-08-28
---
A classic hove effect is to fade out the siblings of an i... | ---
title: Fade out siblings on hover
shortTitle: Sibling fade
language: css
tags: [interactivity]
cover: messy-papers
excerpt: Create a cool effect that fades out the siblings of a hovered item with a few lines of CSS.
listed: true
dateModified: 2024-08-28
---
A classic hove effect is to fade out the siblings of an i... | code_snippets | ||
4d3ef2c9-9343-4d5b-b018-ea309d12c839 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/css/s/shapes.md | unknown | 7637e735-ad77-4bb8-9dc4-952cec31fbf2 | 0 | SemanticChunker@1.0.0 | 785a2705f8fd2820b58c1e144f134be69c9acaa80893be73e7f676b48930989b | ---
title: Create shapes using CSS
shortTitle: Shapes
language: css
tags: [visual,cheatsheet]
cover: oven-paddle
excerpt: Use CSS to create various shapes like circles, triangles, and squares.
listed: true
dateModified: 2024-05-08
---
CSS can be used to create various shapes like circles, triangles, and squares. While... | unknown | unknown | ---
title: Create shapes using CSS
shortTitle: Shapes
language: css
tags: [visual,cheatsheet]
cover: oven-paddle
excerpt: Use CSS to create various shapes like circles, triangles, and squares.
listed: true
dateModified: 2024-05-08
---
CSS can be used to create various shapes like circles, triangles, and squares. While... | ---
title: Create shapes using CSS
shortTitle: Shapes
language: css
tags: [visual,cheatsheet]
cover: oven-paddle
excerpt: Use CSS to create various shapes like circles, triangles, and squares.
listed: true
dateModified: 2024-05-08
---
CSS can be used to create various shapes like circles, triangles, and squares. While... | code_snippets | ||
62c5453e-716c-4241-bdf4-fb9681b38260 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/css/s/shapes.md | unknown | 7637e735-ad77-4bb8-9dc4-952cec31fbf2 | 1 | SemanticChunker@1.0.0 | a6d5183226473edb5ddd89238b21c61ad2c0c982929247d876879d5e0ff6159e | [Square & Rectangle]
## Square & Rectangle
A simple CSS square can be created by setting the `width` and `height` to the same value. Similarly, a rectangle can be created by setting the `width` and `height` to different values.
```html
<div class="square"></div>
<div class="rectangle"></div>
```
```css
.square {
w... | unknown | unknown | [Square & Rectangle]
## Square & Rectangle
A simple CSS square can be created by setting the `width` and `height` to the same value. Similarly, a rectangle can be created by setting the `width` and `height` to different values.
```html
<div class="square"></div>
<div class="rectangle"></div>
```
```css
.square {
w... | [Square & Rectangle]
## Square & Rectangle
A simple CSS square can be created by setting the `width` and `height` to the same value. Similarly, a rectangle can be created by setting the `width` and `height` to different values.
```html
<div class="square"></div>
<div class="rectangle"></div>
```
```css
.square {
w... | code_snippets | ||
7283f7f9-e63a-46e0-9344-efc5bd30660b | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/css/s/shapes.md | unknown | 7637e735-ad77-4bb8-9dc4-952cec31fbf2 | 2 | SemanticChunker@1.0.0 | 915c4531f215aab11738f1a589b45db6146494dc9fb0ed579578e78c7d9d335c | [Square & Rectangle > Circle & Ellipse]
## Circle & Ellipse
Using the `border-radius` property, a circle can be created by setting it to `50%`. The `width` and `height` must be the same to create a circle. Subsequently, an ellipse can be created by providing two values for the `border-radius` and setting the `width` ... | unknown | unknown | [Square & Rectangle > Circle & Ellipse]
## Circle & Ellipse
Using the `border-radius` property, a circle can be created by setting it to `50%`. The `width` and `height` must be the same to create a circle. Subsequently, an ellipse can be created by providing two values for the `border-radius` and setting the `width` ... | [Square & Rectangle > Circle & Ellipse]
## Circle & Ellipse
Using the `border-radius` property, a circle can be created by setting it to `50%`. The `width` and `height` must be the same to create a circle. Subsequently, an ellipse can be created by providing two values for the `border-radius` and setting the `width` ... | code_snippets | ||
faee30da-5595-4097-a36b-63760ae42afa | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/css/s/shapes.md | unknown | 7637e735-ad77-4bb8-9dc4-952cec31fbf2 | 3 | SemanticChunker@1.0.0 | 218ed5cbda00bf9392d088c0fc7c47d1a2345cf95865ef5315220b6cafa80fd7 | [Square & Rectangle > Triangles]
## Triangles
A triangle can be created by using three borders. The `border-width` should be the same for all borders, and the opposite side of where the triangle points towards should have the desired `border-color`. The adjacent borders should have a `border-color` of `transparent`.
... | unknown | unknown | [Square & Rectangle > Triangles]
## Triangles
A triangle can be created by using three borders. The `border-width` should be the same for all borders, and the opposite side of where the triangle points towards should have the desired `border-color`. The adjacent borders should have a `border-color` of `transparent`.
... | [Square & Rectangle > Triangles]
## Triangles
A triangle can be created by using three borders. The `border-width` should be the same for all borders, and the opposite side of where the triangle points towards should have the desired `border-color`. The adjacent borders should have a `border-color` of `transparent`.
... | code_snippets | ||
9e889962-074a-41a6-a6e6-4773718a3f0e | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/css/s/system-font-stack.md | unknown | 5c4ad1ff-7798-42d6-9986-c12a82c55ef7 | 2 | SemanticChunker@1.0.0 | e543acefee763d31fec299969749580b6bcfb020539971d05ed2c88b3a92097c | [Using `system-ui` > Using a custom system font stack]
## Using a custom system font stack
If you want to **support older browsers** or are reluctant to use `system-ui`, you can simply build your own system font stack. In order to do so, you'll have to include the system fonts for all **major operating systems**, as ... | unknown | unknown | [Using `system-ui` > Using a custom system font stack]
## Using a custom system font stack
If you want to **support older browsers** or are reluctant to use `system-ui`, you can simply build your own system font stack. In order to do so, you'll have to include the system fonts for all **major operating systems**, as ... | [Using `system-ui` > Using a custom system font stack]
## Using a custom system font stack
If you want to **support older browsers** or are reluctant to use `system-ui`, you can simply build your own system font stack. In order to do so, you'll have to include the system fonts for all **major operating systems**, as ... | code_snippets | ||
d1ccba1a-eba0-4824-859c-380bec98f8e8 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/css/s/system-font-stack.md | unknown | 5c4ad1ff-7798-42d6-9986-c12a82c55ef7 | 0 | SemanticChunker@1.0.0 | d3e57d5c8a2b26d3349213c2f7c57186a12e88fdfcf018cd5e9eb4ecb4a3beef | ---
title: Define a system font stack in CSS
shortTitle: System font stack
language: css
tags: [visual]
cover: lavender-shelf
excerpt: Learn how to leverage the native fonts of the operating system to get close to a native app feel.
listed: true
dateModified: 2024-03-01
---
Using a **font stack** refers to the practic... | unknown | unknown | ---
title: Define a system font stack in CSS
shortTitle: System font stack
language: css
tags: [visual]
cover: lavender-shelf
excerpt: Learn how to leverage the native fonts of the operating system to get close to a native app feel.
listed: true
dateModified: 2024-03-01
---
Using a **font stack** refers to the practic... | ---
title: Define a system font stack in CSS
shortTitle: System font stack
language: css
tags: [visual]
cover: lavender-shelf
excerpt: Learn how to leverage the native fonts of the operating system to get close to a native app feel.
listed: true
dateModified: 2024-03-01
---
Using a **font stack** refers to the practic... | code_snippets | ||
d9a7f756-5dc4-45f7-bbf0-d44a24a27f17 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/css/s/system-font-stack.md | unknown | 5c4ad1ff-7798-42d6-9986-c12a82c55ef7 | 1 | SemanticChunker@1.0.0 | 75fe83ed035a47d8739c2a6a7d778f96ca7dd5855403c5ec45a9f3e294d7cfd3 | [Using `system-ui`]
## Using `system-ui`
<baseline-support featureId="font-family-system">
</baseline-support>
`system-ui` is a recently introduced generic font family that uses the **system's default UI font**. It's a great way to get a native feel across all operating systems and its browser support is quite impre... | unknown | unknown | [Using `system-ui`]
## Using `system-ui`
<baseline-support featureId="font-family-system">
</baseline-support>
`system-ui` is a recently introduced generic font family that uses the **system's default UI font**. It's a great way to get a native feel across all operating systems and its browser support is quite impre... | [Using `system-ui`]
## Using `system-ui`
<baseline-support featureId="font-family-system">
</baseline-support>
`system-ui` is a recently introduced generic font family that uses the **system's default UI font**. It's a great way to get a native feel across all operating systems and its browser support is quite impre... | code_snippets | ||
da99702a-fa3b-4a42-8966-726d12c09132 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/css/s/squiggle-link-hover-effect.md | unknown | 73242a71-39d8-4768-8e99-0c601661cfe4 | 0 | SemanticChunker@1.0.0 | b3a827a3fe38a48aa16ce4732e2dbb99260178fa3fe69b90f07b2762051dd6ca | ---
title: Squiggle link hover effect
language: css
tags: [animation,visual]
cover: dreamy-flowers
excerpt: Create the most whimsical link hover effect with a squiggle animation.
listed: true
dateModified: 2024-09-15
---
One of the tiniest details I see people get creative with is the hover effect on links. One of the... | unknown | unknown | ---
title: Squiggle link hover effect
language: css
tags: [animation,visual]
cover: dreamy-flowers
excerpt: Create the most whimsical link hover effect with a squiggle animation.
listed: true
dateModified: 2024-09-15
---
One of the tiniest details I see people get creative with is the hover effect on links. One of the... | ---
title: Squiggle link hover effect
language: css
tags: [animation,visual]
cover: dreamy-flowers
excerpt: Create the most whimsical link hover effect with a squiggle animation.
listed: true
dateModified: 2024-09-15
---
One of the tiniest details I see people get creative with is the hover effect on links. One of the... | code_snippets | ||
dfd46a89-ec71-47db-b9d4-4e3072ac52e2 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/css/s/squiggle-link-hover-effect.md | unknown | 73242a71-39d8-4768-8e99-0c601661cfe4 | 1 | SemanticChunker@1.0.0 | 7b60994a58b1260070f686822d11a15d1788c3d89a7aa68f35628e7cbe79a73a | [The SVG image]
## The SVG image
The technique once again hinges on the use of **SVG images** in CSS. This time around we're going to use them as the `background-image` of the link. The SVG will contain a squiggly path that we'll animate to create the squiggle effect. The animation will be a simple translation of the... | unknown | unknown | [The SVG image]
## The SVG image
The technique once again hinges on the use of **SVG images** in CSS. This time around we're going to use them as the `background-image` of the link. The SVG will contain a squiggly path that we'll animate to create the squiggle effect. The animation will be a simple translation of the... | [The SVG image]
## The SVG image
The technique once again hinges on the use of **SVG images** in CSS. This time around we're going to use them as the `background-image` of the link. The SVG will contain a squiggly path that we'll animate to create the squiggle effect. The animation will be a simple translation of the... | code_snippets | ||
e1b3e7ab-af88-4542-b905-afdc5c90aa85 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/css/s/squiggle-link-hover-effect.md | unknown | 73242a71-39d8-4768-8e99-0c601661cfe4 | 2 | SemanticChunker@1.0.0 | 04ac4b7ce1b4f036b0b87c16d6cb0f3126142008da497b84185a177a4a289521 | [The SVG image > Putting it to use]
## Putting it to use
As mentioned already, we'll use `background-image` with the `url()` function to animate the `:hover` state of the link. The SVG will be data encoded in the URL, and we'll set the `background-size` to `auto 4px` to ensure the squiggle path is visible.
However, ... | unknown | unknown | [The SVG image > Putting it to use]
## Putting it to use
As mentioned already, we'll use `background-image` with the `url()` function to animate the `:hover` state of the link. The SVG will be data encoded in the URL, and we'll set the `background-size` to `auto 4px` to ensure the squiggle path is visible.
However, ... | [The SVG image > Putting it to use]
## Putting it to use
As mentioned already, we'll use `background-image` with the `url()` function to animate the `:hover` state of the link. The SVG will be data encoded in the URL, and we'll set the `background-size` to `auto 4px` to ensure the squiggle path is visible.
However, ... | code_snippets | ||
1ac5802f-b255-4018-9654-271d786676ac | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/css/s/variables.md | unknown | f46f0e2a-d9de-4f85-a6b1-008622824162 | 4 | SemanticChunker@1.0.0 | f4d3c37efff49ca4cd6bed0c07c5c353497a4984b1ba8aa00d304868e1496e55 | [Syntax > Tips and tricks]
## Tips and tricks
Finally, keep in mind the following useful tips for working with CSS variables:
- You can define **fallback values**, by providing a second argument to the `var()` function (e.g. `var(--text-color, black)` will default to `black` if `--text-color` is not defined).
- CSS ... | unknown | unknown | [Syntax > Tips and tricks]
## Tips and tricks
Finally, keep in mind the following useful tips for working with CSS variables:
- You can define **fallback values**, by providing a second argument to the `var()` function (e.g. `var(--text-color, black)` will default to `black` if `--text-color` is not defined).
- CSS ... | [Syntax > Tips and tricks]
## Tips and tricks
Finally, keep in mind the following useful tips for working with CSS variables:
- You can define **fallback values**, by providing a second argument to the `var()` function (e.g. `var(--text-color, black)` will default to `black` if `--text-color` is not defined).
- CSS ... | code_snippets | ||
cc578609-2325-4796-8037-eb832ed12caa | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/css/s/variables.md | unknown | f46f0e2a-d9de-4f85-a6b1-008622824162 | 3 | SemanticChunker@1.0.0 | b08401e1ca8003d5eb846277af85f847289baee9a2923bc125686aad3639975c | [Syntax > Shared styles]
## Shared styles
Another useful example is **defining shared customized styles** for certain variants of an element. This allows the customization of whole trees of components without having to repeat any styles. The following example demonstrates cascading even better than the previous one. ... | unknown | unknown | [Syntax > Shared styles]
## Shared styles
Another useful example is **defining shared customized styles** for certain variants of an element. This allows the customization of whole trees of components without having to repeat any styles. The following example demonstrates cascading even better than the previous one. ... | [Syntax > Shared styles]
## Shared styles
Another useful example is **defining shared customized styles** for certain variants of an element. This allows the customization of whole trees of components without having to repeat any styles. The following example demonstrates cascading even better than the previous one. ... | code_snippets | ||
db8920bc-318a-45c7-99a0-09d7864081f4 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/css/s/variables.md | unknown | f46f0e2a-d9de-4f85-a6b1-008622824162 | 1 | SemanticChunker@1.0.0 | 87d2be64e55fcad6c65cd7f55fa7784ebdbcf93c0baf5da0604f85c9a7a2762a | [Syntax]
## Syntax
As specified in the custom property notation, CSS variables are **prefixed with two dashes** (e.g. `--my-color`). To access them, you can use the `var()` function (e.g. `var(--my-color)`). CSS variables are exceptionally useful for **sharing styles** between different elements and components. Examp... | unknown | unknown | [Syntax]
## Syntax
As specified in the custom property notation, CSS variables are **prefixed with two dashes** (e.g. `--my-color`). To access them, you can use the `var()` function (e.g. `var(--my-color)`). CSS variables are exceptionally useful for **sharing styles** between different elements and components. Examp... | [Syntax]
## Syntax
As specified in the custom property notation, CSS variables are **prefixed with two dashes** (e.g. `--my-color`). To access them, you can use the `var()` function (e.g. `var(--my-color)`). CSS variables are exceptionally useful for **sharing styles** between different elements and components. Examp... | code_snippets | ||
e70c25f1-5a18-49f6-bab3-ed546aa8c87b | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/css/s/variables.md | unknown | f46f0e2a-d9de-4f85-a6b1-008622824162 | 2 | SemanticChunker@1.0.0 | ef65d4b3f87047856719c4edf6ff75e40958decb575fb3a3ea1e4a4bb37c7e97 | [Syntax > Theming and dark mode]
## Theming and dark mode
One of their most common use-cases is **theming and dark mode**. CSS variables can be used to create a shared palette across the whole website and easily swap it for a different one. This is often accomplished by applying a class to a common ancestor (e.g. the... | unknown | unknown | [Syntax > Theming and dark mode]
## Theming and dark mode
One of their most common use-cases is **theming and dark mode**. CSS variables can be used to create a shared palette across the whole website and easily swap it for a different one. This is often accomplished by applying a class to a common ancestor (e.g. the... | [Syntax > Theming and dark mode]
## Theming and dark mode
One of their most common use-cases is **theming and dark mode**. CSS variables can be used to create a shared palette across the whole website and easily swap it for a different one. This is often accomplished by applying a class to a common ancestor (e.g. the... | code_snippets | ||
ef617526-891b-463e-8de0-d084a3253ac0 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/css/s/variables.md | unknown | f46f0e2a-d9de-4f85-a6b1-008622824162 | 0 | SemanticChunker@1.0.0 | a9459571660bbfdaacaca22150ce0575ce4d4cdbba8b366f4b36a0a0e2a55812 | ---
title: What are CSS variables and where can I use them?
shortTitle: CSS variables
language: css
tags: [visual,layout]
cover: css-variables
excerpt: Learn how CSS custom properties (CSS variables) work and what you can use them for in your code and designs.
listed: true
dateModified: 2024-08-24
---
CSS variables (o... | unknown | unknown | ---
title: What are CSS variables and where can I use them?
shortTitle: CSS variables
language: css
tags: [visual,layout]
cover: css-variables
excerpt: Learn how CSS custom properties (CSS variables) work and what you can use them for in your code and designs.
listed: true
dateModified: 2024-08-24
---
CSS variables (o... | ---
title: What are CSS variables and where can I use them?
shortTitle: CSS variables
language: css
tags: [visual,layout]
cover: css-variables
excerpt: Learn how CSS custom properties (CSS variables) work and what you can use them for in your code and designs.
listed: true
dateModified: 2024-08-24
---
CSS variables (o... | code_snippets | ||
42ce7234-1c57-4bcf-9182-f9b88b4cf031 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/git/s/5-tips-for-better-pull-requests.md | unknown | f829f935-47ac-4921-b6ed-66c24e78b0df | 2 | SemanticChunker@1.0.0 | 24b417456cf3aa8883c8ce35eb1f8dddb2ecd7829718501fc2959a37654c4b63 | [Small pull requests > Good descriptions]
## Good descriptions
Always take the time to describe your code and any related tasks in your pull request. Explain the feature you are implementing or the bug you are fixing and provide images and steps to reproduce, if applicable. Note decisions made during implementation, ... | unknown | unknown | [Small pull requests > Good descriptions]
## Good descriptions
Always take the time to describe your code and any related tasks in your pull request. Explain the feature you are implementing or the bug you are fixing and provide images and steps to reproduce, if applicable. Note decisions made during implementation, ... | [Small pull requests > Good descriptions]
## Good descriptions
Always take the time to describe your code and any related tasks in your pull request. Explain the feature you are implementing or the bug you are fixing and provide images and steps to reproduce, if applicable. Note decisions made during implementation, ... | code_snippets | ||
45271551-3b5a-4af6-9922-822c389a7c6d | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/git/s/5-tips-for-better-pull-requests.md | unknown | f829f935-47ac-4921-b6ed-66c24e78b0df | 1 | SemanticChunker@1.0.0 | 0c1c3f9dd5f811f3b0e88d8173fb626221513afc44dbef11bb3f840109990b32 | [Small pull requests]
## Small pull requests
The pull requests that get reviewed more thoroughly and confidently and are most often prioritized by developers with limited time are the smallest ones. Make sure you separate concerns into different pull requests (e.g. refactoring and feature implementation), while also ... | unknown | unknown | [Small pull requests]
## Small pull requests
The pull requests that get reviewed more thoroughly and confidently and are most often prioritized by developers with limited time are the smallest ones. Make sure you separate concerns into different pull requests (e.g. refactoring and feature implementation), while also ... | [Small pull requests]
## Small pull requests
The pull requests that get reviewed more thoroughly and confidently and are most often prioritized by developers with limited time are the smallest ones. Make sure you separate concerns into different pull requests (e.g. refactoring and feature implementation), while also ... | code_snippets | ||
5f6c75d9-235a-469a-b498-cd793244c1f8 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/git/s/5-tips-for-better-pull-requests.md | unknown | f829f935-47ac-4921-b6ed-66c24e78b0df | 3 | SemanticChunker@1.0.0 | ca06ef9b4ae03b5fc2862daa194439d0ad201d10ffeb4d0177acf3371608dd7e | [Small pull requests > Rebase onto master]
## Rebase onto master
Always rebase your pull requests onto the `master` branch of the repository. This way you can always test your code against the latest changes and resolve merge conflicts, minimizing issues that might arise later on. Apart from that, reviewers will not ... | unknown | unknown | [Small pull requests > Rebase onto master]
## Rebase onto master
Always rebase your pull requests onto the `master` branch of the repository. This way you can always test your code against the latest changes and resolve merge conflicts, minimizing issues that might arise later on. Apart from that, reviewers will not ... | [Small pull requests > Rebase onto master]
## Rebase onto master
Always rebase your pull requests onto the `master` branch of the repository. This way you can always test your code against the latest changes and resolve merge conflicts, minimizing issues that might arise later on. Apart from that, reviewers will not ... | code_snippets | ||
8759a414-6a02-45dc-8b94-1511b3fad995 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/git/s/5-tips-for-better-pull-requests.md | unknown | f829f935-47ac-4921-b6ed-66c24e78b0df | 4 | SemanticChunker@1.0.0 | 5fed2f3686d216af470f1921fe2712d8701fe2e51d60000782b0a26fc42c6653 | [Small pull requests > Review it yourself]
## Review it yourself
Before submitting your pull request for review, always take the time to review it yourself. That way you can handle some low-hanging fruits (typos, easy optimizations, leftover code etc.) and check things you would in other people's pull requests. Self-... | unknown | unknown | [Small pull requests > Review it yourself]
## Review it yourself
Before submitting your pull request for review, always take the time to review it yourself. That way you can handle some low-hanging fruits (typos, easy optimizations, leftover code etc.) and check things you would in other people's pull requests. Self-... | [Small pull requests > Review it yourself]
## Review it yourself
Before submitting your pull request for review, always take the time to review it yourself. That way you can handle some low-hanging fruits (typos, easy optimizations, leftover code etc.) and check things you would in other people's pull requests. Self-... | code_snippets | ||
ac3c769a-a1b9-4616-8988-51db117b88f1 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/git/s/5-tips-for-better-pull-requests.md | unknown | f829f935-47ac-4921-b6ed-66c24e78b0df | 0 | SemanticChunker@1.0.0 | 4dabe86a5afcf3d1edfb336a2702986592bd0775a55526ab157574c853efba45 | ---
title: 5 tips for better Pull Requests
language: git
tags: [github,programming,webdev]
cover: keyboard-tea
excerpt: Writing good code is only part of the job. Here are 5 tips to improve your pull requests and help people review them.
listed: false
dateModified: 2021-06-12
---
Writing good code is only part of the ... | unknown | unknown | ---
title: 5 tips for better Pull Requests
language: git
tags: [github,programming,webdev]
cover: keyboard-tea
excerpt: Writing good code is only part of the job. Here are 5 tips to improve your pull requests and help people review them.
listed: false
dateModified: 2021-06-12
---
Writing good code is only part of the ... | ---
title: 5 tips for better Pull Requests
language: git
tags: [github,programming,webdev]
cover: keyboard-tea
excerpt: Writing good code is only part of the job. Here are 5 tips to improve your pull requests and help people review them.
listed: false
dateModified: 2021-06-12
---
Writing good code is only part of the ... | code_snippets | ||
e6afe71e-d767-4b9c-b332-e3e73ab0eba8 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/git/s/5-tips-for-better-pull-requests.md | unknown | f829f935-47ac-4921-b6ed-66c24e78b0df | 5 | SemanticChunker@1.0.0 | 44d9b311d2612b95e8d8737a401efda665f3839547507df5c912f4989584cd2f | [Small pull requests > Respond to reviews]
## Respond to reviews
Set some time aside to respond to reviews after submitting your pull request. Handle anything you can as soon as possible and start discussion whenever necessary to arrive at a solution. Use `--fixup` for changes suggested in review comments or add new ... | unknown | unknown | [Small pull requests > Respond to reviews]
## Respond to reviews
Set some time aside to respond to reviews after submitting your pull request. Handle anything you can as soon as possible and start discussion whenever necessary to arrive at a solution. Use `--fixup` for changes suggested in review comments or add new ... | [Small pull requests > Respond to reviews]
## Respond to reviews
Set some time aside to respond to reviews after submitting your pull request. Handle anything you can as soon as possible and start discussion whenever necessary to arrive at a solution. Use `--fixup` for changes suggested in review comments or add new ... | code_snippets | ||
0abbfc64-2ead-4118-b366-0dea75f53ed6 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/css/s/units-cheatsheet.md | unknown | 55c07f9f-28f6-4d5e-9321-332c8bfa67d0 | 0 | SemanticChunker@1.0.0 | dfa9cccf58d2fc4b8b65043937c49d0af9eaaa8a9e3c089c4a04b9ad94d1c9a5 | ---
title: CSS units Cheat Sheet
language: css
tags: [layout,cheatsheet]
cover: measuring
excerpt: Learn everything you need to know about CSS units with this handy cheatsheet.
listed: true
dateModified: 2021-06-12
---
- `px`: Absolute pixel value
- `rem`: Relative to the `font-size` of the root element
- `em`: Relati... | unknown | unknown | ---
title: CSS units Cheat Sheet
language: css
tags: [layout,cheatsheet]
cover: measuring
excerpt: Learn everything you need to know about CSS units with this handy cheatsheet.
listed: true
dateModified: 2021-06-12
---
- `px`: Absolute pixel value
- `rem`: Relative to the `font-size` of the root element
- `em`: Relati... | ---
title: CSS units Cheat Sheet
language: css
tags: [layout,cheatsheet]
cover: measuring
excerpt: Learn everything you need to know about CSS units with this handy cheatsheet.
listed: true
dateModified: 2021-06-12
---
- `px`: Absolute pixel value
- `rem`: Relative to the `font-size` of the root element
- `em`: Relati... | code_snippets | ||
6204c698-eac8-423c-9f22-0e709d8c32d3 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/css/s/unitless-line-height.md | unknown | 8111fc37-9ed8-4e21-87d1-4456b311a08f | 0 | SemanticChunker@1.0.0 | ec8f58609ecc41ff28fc4b096e2a0f6d790b586f2b26cfde1eba6c75636ef8c9 | ---
title: Why should line-height be unitless in CSS?
shortTitle: Unitless line height
language: css
tags: [layout,visual]
cover: gold-typewriter
excerpt: You might have heard that `line-height` should be unitless, but do you know why?
listed: true
dateModified: 2022-11-27
---
I've often heard that `line-height` shoul... | unknown | unknown | ---
title: Why should line-height be unitless in CSS?
shortTitle: Unitless line height
language: css
tags: [layout,visual]
cover: gold-typewriter
excerpt: You might have heard that `line-height` should be unitless, but do you know why?
listed: true
dateModified: 2022-11-27
---
I've often heard that `line-height` shoul... | ---
title: Why should line-height be unitless in CSS?
shortTitle: Unitless line height
language: css
tags: [layout,visual]
cover: gold-typewriter
excerpt: You might have heard that `line-height` should be unitless, but do you know why?
listed: true
dateModified: 2022-11-27
---
I've often heard that `line-height` shoul... | code_snippets | ||
fe1e0707-f573-4796-aa5c-978126b6d39b | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/css/s/zebra-striped-list-or-table.md | unknown | 273a38fe-b352-4bbd-b17c-577c35562dee | 0 | SemanticChunker@1.0.0 | 24106bc5bdb8bc76b5544d6872b44301949c296483e8d7ff6742ee3c372897d3 | ---
title: Zebra striped list or table
language: css
tags: [visual]
cover: forest-balcony
excerpt: Use this CSS selector to create a striped list with alternating background colors.
listed: true
dateModified: 2024-09-03
---
Zebra striped **lists** and **tables** are a great way to improve the **readability** of your c... | unknown | unknown | ---
title: Zebra striped list or table
language: css
tags: [visual]
cover: forest-balcony
excerpt: Use this CSS selector to create a striped list with alternating background colors.
listed: true
dateModified: 2024-09-03
---
Zebra striped **lists** and **tables** are a great way to improve the **readability** of your c... | ---
title: Zebra striped list or table
language: css
tags: [visual]
cover: forest-balcony
excerpt: Use this CSS selector to create a striped list with alternating background colors.
listed: true
dateModified: 2024-09-03
---
Zebra striped **lists** and **tables** are a great way to improve the **readability** of your c... | code_snippets | ||
701f3e3f-b135-4e55-b6c3-cb197812bf82 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/css/s/typographic-scale-basics.md | unknown | 7d326a1c-2666-4071-a9f9-65eda4271ba2 | 1 | SemanticChunker@1.0.0 | 338f05d8b3e572213c9917a20cf7887e840ddfc4c1e5681d7f18fd594d5afa42 | 
```css
:root {
--font-family: 'Roboto', sans-serif;
--font-size: 18px;
--font-weight: 300;
--line-height: 1.618;
}
* {
font-family: var(--font-family);
font-size: var(--font-size);
font-weight: var(--font-weight);
line-height: var(--line-hei... | unknown | unknown | 
```css
:root {
--font-family: 'Roboto', sans-serif;
--font-size: 18px;
--font-weight: 300;
--line-height: 1.618;
}
* {
font-family: var(--font-family);
font-size: var(--font-size);
font-weight: var(--font-weight);
line-height: var(--line-hei... | 
```css
:root {
--font-family: 'Roboto', sans-serif;
--font-size: 18px;
--font-weight: 300;
--line-height: 1.618;
}
* {
font-family: var(--font-family);
font-size: var(--font-size);
font-weight: var(--font-weight);
line-height: var(--line-hei... | code_snippets | ||
da156171-29d1-43ba-8f8f-1ebf933a2a21 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/css/s/typographic-scale-basics.md | unknown | 7d326a1c-2666-4071-a9f9-65eda4271ba2 | 0 | SemanticChunker@1.0.0 | d4dbe9c46b1bb656a54a528c841c1f03f452e03126d7100a3aeb4186e7fb74d3 | ---
title: Typographic scale basics
language: css
tags: [webdev,typography]
cover: typography
excerpt: Typography might seem intimidating, but you can quickly and easily create a simple typographic scale with this basic technique.
listed: true
dateModified: 2021-11-07
---
Building a typographic scale might seem hard. ... | unknown | unknown | ---
title: Typographic scale basics
language: css
tags: [webdev,typography]
cover: typography
excerpt: Typography might seem intimidating, but you can quickly and easily create a simple typographic scale with this basic technique.
listed: true
dateModified: 2021-11-07
---
Building a typographic scale might seem hard. ... | ---
title: Typographic scale basics
language: css
tags: [webdev,typography]
cover: typography
excerpt: Typography might seem intimidating, but you can quickly and easily create a simple typographic scale with this basic technique.
listed: true
dateModified: 2021-11-07
---
Building a typographic scale might seem hard. ... | code_snippets | ||
8846a1d8-c1dd-43c6-87c0-cf0cba7be666 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/css/s/typewriter-effect.md | unknown | e46966e2-72e7-49e0-9e58-95cca1bcead2 | 0 | SemanticChunker@1.0.0 | d474db2d3570e140d81daf764e6fb14c3dbc9f27624a8d8c956372b6e8c0634f | ---
title: Typewriter effect
language: css
tags: [animation]
cover: italian-horizon
excerpt: Create a typewriter effect animation with CSS variables and just a sprinkle of JavaScript.
listed: true
dateModified: 2024-09-06
---
Aren't typewriter effects cool? They can be used to create a sense of suspense or to make you... | unknown | unknown | ---
title: Typewriter effect
language: css
tags: [animation]
cover: italian-horizon
excerpt: Create a typewriter effect animation with CSS variables and just a sprinkle of JavaScript.
listed: true
dateModified: 2024-09-06
---
Aren't typewriter effects cool? They can be used to create a sense of suspense or to make you... | ---
title: Typewriter effect
language: css
tags: [animation]
cover: italian-horizon
excerpt: Create a typewriter effect animation with CSS variables and just a sprinkle of JavaScript.
listed: true
dateModified: 2024-09-06
---
Aren't typewriter effects cool? They can be used to create a sense of suspense or to make you... | code_snippets | ||
9f015c5e-c43f-42f3-8e62-f9fbb4941572 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/css/snippet-template.md | unknown | c9380e86-cc51-4850-a119-060f1a80b3e3 | 0 | SemanticChunker@1.0.0 | a23296ce4534ea6a97238a47f091c40510db01c58a018e9fc50dc906db767183 | ---
title: My amazing story
shortTitle: Amazing story
language: css
tags: [layout]
cover: image
excerpt: A short summary of your story up to 140 characters long.
listed: true
dateModified: 2021-06-13
---
Write your story here. | unknown | unknown | ---
title: My amazing story
shortTitle: Amazing story
language: css
tags: [layout]
cover: image
excerpt: A short summary of your story up to 140 characters long.
listed: true
dateModified: 2021-06-13
---
Write your story here. | ---
title: My amazing story
shortTitle: Amazing story
language: css
tags: [layout]
cover: image
excerpt: A short summary of your story up to 140 characters long.
listed: true
dateModified: 2021-06-13
---
Write your story here. | code_snippets | ||
01059acd-e52c-4119-88c8-afd5b8994b65 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/demo/s/test-snippet.md | unknown | 13560d3c-1c0e-4cab-87ad-c9724b0b4589 | 19 | SemanticChunker@1.0.0 | 927fcb1818f9ffcce79691c19d703113e0653fc769ee02cafaec35611997bf7c | [Custom components > Code tabs]
#### Code tabs
<code-tabs>
<details>
<summary>View the complete implementation</summary>
```js title="Currency.js"
const isoCodes = Intl.supportedValuesOf('currency');
const currencyFields = ['symbol', 'narrowSymbol', 'name'];
const allCurrencies = new Map(
isoCodes.map(code => {
... | unknown | unknown | [Custom components > Code tabs]
#### Code tabs
<code-tabs>
<details>
<summary>View the complete implementation</summary>
```js title="Currency.js"
const isoCodes = Intl.supportedValuesOf('currency');
const currencyFields = ['symbol', 'narrowSymbol', 'name'];
const allCurrencies = new Map(
isoCodes.map(code => {
... | [Custom components > Code tabs]
#### Code tabs
<code-tabs>
<details>
<summary>View the complete implementation</summary>
```js title="Currency.js"
const isoCodes = Intl.supportedValuesOf('currency');
const currencyFields = ['symbol', 'narrowSymbol', 'name'];
const allCurrencies = new Map(
isoCodes.map(code => {
... | code_snippets | ||
034954ad-6db7-44a4-91ae-4ee3f403df7e | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/demo/s/test-snippet.md | unknown | 13560d3c-1c0e-4cab-87ad-c9724b0b4589 | 15 | SemanticChunker@1.0.0 | 4c637f516be26e6794fd0e66b61fa0739213543c43586ce5a3f0a6bf79960553 | [Other elements > Lists]
### Lists
Somehow, we forgot about lists, but they are something we use a ton.
- This is a list item
- Part of an unordered list
- That has a few items
- Sometimes we have sub-items
- That are also unordered
- And we can go back to the main list
1. This is a list item
2. Part of an ordere... | unknown | unknown | [Other elements > Lists]
### Lists
Somehow, we forgot about lists, but they are something we use a ton.
- This is a list item
- Part of an unordered list
- That has a few items
- Sometimes we have sub-items
- That are also unordered
- And we can go back to the main list
1. This is a list item
2. Part of an ordere... | [Other elements > Lists]
### Lists
Somehow, we forgot about lists, but they are something we use a ton.
- This is a list item
- Part of an unordered list
- That has a few items
- Sometimes we have sub-items
- That are also unordered
- And we can go back to the main list
1. This is a list item
2. Part of an ordere... | code_snippets | ||
036d9001-0c6e-4eca-ab29-651997e202d6 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/demo/s/test-snippet.md | unknown | 13560d3c-1c0e-4cab-87ad-c9724b0b4589 | 4 | SemanticChunker@1.0.0 | 3a5395e8b6f160b3fd617a6cc9be94db6014a49f62187d898d799f325a455d1d | [Headings > Links]
## Links
Links come in all shapes and sizes. They are often in the form of an automatically generated reference, such as `Array.from()`.
Other times, they might be plain text linking to an internal resource, such as [this link](/demo/s/test-snippet).
And some other times, you might get a mixed co... | unknown | unknown | [Headings > Links]
## Links
Links come in all shapes and sizes. They are often in the form of an automatically generated reference, such as `Array.from()`.
Other times, they might be plain text linking to an internal resource, such as [this link](/demo/s/test-snippet).
And some other times, you might get a mixed co... | [Headings > Links]
## Links
Links come in all shapes and sizes. They are often in the form of an automatically generated reference, such as `Array.from()`.
Other times, they might be plain text linking to an internal resource, such as [this link](/demo/s/test-snippet).
And some other times, you might get a mixed co... | code_snippets | ||
04d8150a-750e-4cb3-a9b9-ff0042b0a5ce | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/demo/s/test-snippet.md | unknown | 13560d3c-1c0e-4cab-87ad-c9724b0b4589 | 8 | SemanticChunker@1.0.0 | 5a56da9089e3941d9d36081ad9b3af00e54c2fa47e89168bf4196ad518a71fda | [Code > Very long token]
### Very long token
```js
// This is some long code that can't wrap on mobile
const thisIsAnExtremelyLongVariableNameJustForTestingIHopeINeverDoThisInRealLifeBecauseItIsTerrible = 'this is a test';
``` | unknown | unknown | [Code > Very long token]
### Very long token
```js
// This is some long code that can't wrap on mobile
const thisIsAnExtremelyLongVariableNameJustForTestingIHopeINeverDoThisInRealLifeBecauseItIsTerrible = 'this is a test';
``` | [Code > Very long token]
### Very long token
```js
// This is some long code that can't wrap on mobile
const thisIsAnExtremelyLongVariableNameJustForTestingIHopeINeverDoThisInRealLifeBecauseItIsTerrible = 'this is a test';
``` | code_snippets | ||
066e45e6-d87a-4834-8f13-5343e9263903 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/demo/s/test-snippet.md | unknown | 13560d3c-1c0e-4cab-87ad-c9724b0b4589 | 18 | SemanticChunker@1.0.0 | 503a0c07db01426902ad57f6ec5d6c95bf7f1987a515fa54bbc9b4ac1cdfab71 | [Custom components > Step visualizer]
#### Step visualizer
<step-visualizer>
<script data-attribute-name="labels" type="application/json">
[
"First step",
"Second step",
"Third & final step"
]
</script>
| State No. | Production | Origin | Comment |
|-----------|--------------|--------|------------------------... | unknown | unknown | [Custom components > Step visualizer]
#### Step visualizer
<step-visualizer>
<script data-attribute-name="labels" type="application/json">
[
"First step",
"Second step",
"Third & final step"
]
</script>
| State No. | Production | Origin | Comment |
|-----------|--------------|--------|------------------------... | [Custom components > Step visualizer]
#### Step visualizer
<step-visualizer>
<script data-attribute-name="labels" type="application/json">
[
"First step",
"Second step",
"Third & final step"
]
</script>
| State No. | Production | Origin | Comment |
|-----------|--------------|--------|------------------------... | code_snippets | ||
21990edc-451e-4d28-a264-b1de16da2d98 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/demo/s/test-snippet.md | unknown | 13560d3c-1c0e-4cab-87ad-c9724b0b4589 | 3 | SemanticChunker@1.0.0 | 57aa2b7b6a50da1b7ce60aa1c8886d47781245e780fa0fcf27787178ffbaed18 | [This is a level 3 heading with `some code` > This is a level 4 heading with `some code`]
#### This is a level 4 heading with `some code`
```html
<h4>Didn't see this one coming, huh?</h4>
```
This was a good opportunity to test what a code block would look like right after a heading. Hope it looks good! | unknown | unknown | [This is a level 3 heading with `some code` > This is a level 4 heading with `some code`]
#### This is a level 4 heading with `some code`
```html
<h4>Didn't see this one coming, huh?</h4>
```
This was a good opportunity to test what a code block would look like right after a heading. Hope it looks good! | [This is a level 3 heading with `some code` > This is a level 4 heading with `some code`]
#### This is a level 4 heading with `some code`
```html
<h4>Didn't see this one coming, huh?</h4>
```
This was a good opportunity to test what a code block would look like right after a heading. Hope it looks good! | code_snippets | ||
355da086-61c3-43bf-bf22-ff828624a040 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/demo/s/test-snippet.md | unknown | 13560d3c-1c0e-4cab-87ad-c9724b0b4589 | 7 | SemanticChunker@1.0.0 | 0122e9d2de19df94e323a06eb88d00c6c6d4b5049b212bf8fe459c3fe260ca1c | [Code > Three consecutive code blocks, in different languages]
### Three consecutive code blocks, in different languages
```html
<div class="something">
<p>Some text</p>
</div>
```
```css
.something {
display: flex;
flex-direction: column;
}
```
```js
const element = document.querySelector('.something');
if (el... | unknown | unknown | [Code > Three consecutive code blocks, in different languages]
### Three consecutive code blocks, in different languages
```html
<div class="something">
<p>Some text</p>
</div>
```
```css
.something {
display: flex;
flex-direction: column;
}
```
```js
const element = document.querySelector('.something');
if (el... | [Code > Three consecutive code blocks, in different languages]
### Three consecutive code blocks, in different languages
```html
<div class="something">
<p>Some text</p>
</div>
```
```css
.something {
display: flex;
flex-direction: column;
}
```
```js
const element = document.querySelector('.something');
if (el... | code_snippets | ||
37ea5a40-1303-4a62-a0d4-11ec24b09cd6 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/demo/s/test-snippet.md | unknown | 13560d3c-1c0e-4cab-87ad-c9724b0b4589 | 1 | SemanticChunker@1.0.0 | c5752256e4f74e75c7684b81261a3862784bda7b61e0be1bdb68b0faaf7ae8bd | [Headings > This is a level 2 heading with `some code`]
## This is a level 2 heading with `some code`
In order to better test headings, we need to make sure that we have a lot of text here. The spacing between headings and paragraphs is imperative to get right. | unknown | unknown | [Headings > This is a level 2 heading with `some code`]
## This is a level 2 heading with `some code`
In order to better test headings, we need to make sure that we have a lot of text here. The spacing between headings and paragraphs is imperative to get right. | [Headings > This is a level 2 heading with `some code`]
## This is a level 2 heading with `some code`
In order to better test headings, we need to make sure that we have a lot of text here. The spacing between headings and paragraphs is imperative to get right. | code_snippets | ||
39799c04-2ae7-4889-9f9e-30f89a1b40c1 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/demo/s/test-snippet.md | unknown | 13560d3c-1c0e-4cab-87ad-c9724b0b4589 | 17 | SemanticChunker@1.0.0 | 9a54fea475f19646341d08fa4930768b528599454c916b6cfe0d913b4df68480 | [Embedded content > Article embeds]
#### Article embeds
@[Won't render](/demo/s/test-snippet)
@[Suggested reading](/js/s/immutable-object-proxy)
@[Further reading](/js/proxy/p/1)
@[You may also like](/js/array)
@[Quick refresher](/js/s/string-case-conversion#convert-any-case-to-kebab-case) | unknown | unknown | [Embedded content > Article embeds]
#### Article embeds
@[Won't render](/demo/s/test-snippet)
@[Suggested reading](/js/s/immutable-object-proxy)
@[Further reading](/js/proxy/p/1)
@[You may also like](/js/array)
@[Quick refresher](/js/s/string-case-conversion#convert-any-case-to-kebab-case) | [Embedded content > Article embeds]
#### Article embeds
@[Won't render](/demo/s/test-snippet)
@[Suggested reading](/js/s/immutable-object-proxy)
@[Further reading](/js/proxy/p/1)
@[You may also like](/js/array)
@[Quick refresher](/js/s/string-case-conversion#convert-any-case-to-kebab-case) | code_snippets | ||
42a7351f-f01c-4cf0-a246-3c6c3feadce9 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/demo/s/test-snippet.md | unknown | 13560d3c-1c0e-4cab-87ad-c9724b0b4589 | 21 | SemanticChunker@1.0.0 | 5f3232ffa124b364169f2ff15418a95fd243d94bfd9ab48b82163f789dd8dbec | [Custom components > Code tabs]
subtract(money) {
if (this.currency !== money.currency)
money = money.exchangeTo(this.currency);
return new Money(this.value - money.value, this.currency);
}
multiply(num) {
return new Money(this.value * num, this.currency);
}
divide(num) {
return new Money(this.value / num, ... | unknown | unknown | [Custom components > Code tabs]
subtract(money) {
if (this.currency !== money.currency)
money = money.exchangeTo(this.currency);
return new Money(this.value - money.value, this.currency);
}
multiply(num) {
return new Money(this.value * num, this.currency);
}
divide(num) {
return new Money(this.value / num, ... | [Custom components > Code tabs]
subtract(money) {
if (this.currency !== money.currency)
money = money.exchangeTo(this.currency);
return new Money(this.value - money.value, this.currency);
}
multiply(num) {
return new Money(this.value * num, this.currency);
}
divide(num) {
return new Money(this.value / num, ... | code_snippets | ||
46e095cb-3e7b-4c11-91be-688a864034af | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/demo/s/test-snippet.md | unknown | 13560d3c-1c0e-4cab-87ad-c9724b0b4589 | 6 | SemanticChunker@1.0.0 | 233219e3340eeb4e850f5b466cb8803149a2de84ef74c0f5eb6c33f42a970871 | [Code > Single code block, with a language]
### Single code block, with a language
```js
// First we need to make sure lines that are 80 characters long fit snugly here.
const aFunction = (a, b = 2) => {
if (a === b) return b;
const c = a * b;
const d = a > b ? `${a} is larger` : `${a} is smaller`;
const e = 'som... | unknown | unknown | [Code > Single code block, with a language]
### Single code block, with a language
```js
// First we need to make sure lines that are 80 characters long fit snugly here.
const aFunction = (a, b = 2) => {
if (a === b) return b;
const c = a * b;
const d = a > b ? `${a} is larger` : `${a} is smaller`;
const e = 'som... | [Code > Single code block, with a language]
### Single code block, with a language
```js
// First we need to make sure lines that are 80 characters long fit snugly here.
const aFunction = (a, b = 2) => {
if (a === b) return b;
const c = a * b;
const d = a > b ? `${a} is larger` : `${a} is smaller`;
const e = 'som... | code_snippets | ||
50fde749-6347-4105-9bff-6e6687244eb8 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/demo/s/test-snippet.md | unknown | 13560d3c-1c0e-4cab-87ad-c9724b0b4589 | 9 | SemanticChunker@1.0.0 | a91a473924de02c4e53a64778ad31b668256b6f3beb52b8833a8bc6193fb2484 | [Code > Single code block, without a language]
### Single code block, without a language
```
This is a code block without a language. It doesn't appear very often, yet it's important to make sure it looks good.
Let's also ensure lines wrap on their, as needed. Might come in handy!
``` | unknown | unknown | [Code > Single code block, without a language]
### Single code block, without a language
```
This is a code block without a language. It doesn't appear very often, yet it's important to make sure it looks good.
Let's also ensure lines wrap on their, as needed. Might come in handy!
``` | [Code > Single code block, without a language]
### Single code block, without a language
```
This is a code block without a language. It doesn't appear very often, yet it's important to make sure it looks good.
Let's also ensure lines wrap on their, as needed. Might come in handy!
``` | code_snippets | ||
8381a98b-9681-4e2e-8932-b192ebb92622 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/demo/s/test-snippet.md | unknown | 13560d3c-1c0e-4cab-87ad-c9724b0b4589 | 14 | SemanticChunker@1.0.0 | 4e809574086d44af9ed5848a3da1053fd1807013b8c96f18ef7edfae74333c4e | [Other elements > Tables]
### Tables
Tables are quite special and they may be used in a few places. Let's make sure they look great.
| | Cookies | Local storage | Session storage |
| -- | -- | -- | -- |
| **Capacity** | 4KB | 10MB | 5MB |
| **Accessible from** | Any window | Any window | Same tab |
| **Expiration** ... | unknown | unknown | [Other elements > Tables]
### Tables
Tables are quite special and they may be used in a few places. Let's make sure they look great.
| | Cookies | Local storage | Session storage |
| -- | -- | -- | -- |
| **Capacity** | 4KB | 10MB | 5MB |
| **Accessible from** | Any window | Any window | Same tab |
| **Expiration** ... | [Other elements > Tables]
### Tables
Tables are quite special and they may be used in a few places. Let's make sure they look great.
| | Cookies | Local storage | Session storage |
| -- | -- | -- | -- |
| **Capacity** | 4KB | 10MB | 5MB |
| **Accessible from** | Any window | Any window | Same tab |
| **Expiration** ... | code_snippets | ||
931e5df0-76aa-48b5-afbb-41b079294e16 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/demo/s/test-snippet.md | unknown | 13560d3c-1c0e-4cab-87ad-c9724b0b4589 | 11 | SemanticChunker@1.0.0 | 308bcb631c24719245167ac802dd2214a50adccffb0b8ebc29299eaded705e07 | [Code > Highlighted lines]
### Highlighted lines
Regular:
```js {1} {3-4}
const x = 10;
x += 5;
const y = 20;
console.log(x + y);
```
With labels:
```js {"A":1} {"B":3-4}
const x = 10;
x += 5;
const y = 20;
console.log(x + y);
```
With longer labels:
```js {"A":1} {"B. This is a fairly long label and it needs i... | unknown | unknown | [Code > Highlighted lines]
### Highlighted lines
Regular:
```js {1} {3-4}
const x = 10;
x += 5;
const y = 20;
console.log(x + y);
```
With labels:
```js {"A":1} {"B":3-4}
const x = 10;
x += 5;
const y = 20;
console.log(x + y);
```
With longer labels:
```js {"A":1} {"B. This is a fairly long label and it needs i... | [Code > Highlighted lines]
### Highlighted lines
Regular:
```js {1} {3-4}
const x = 10;
x += 5;
const y = 20;
console.log(x + y);
```
With labels:
```js {"A":1} {"B":3-4}
const x = 10;
x += 5;
const y = 20;
console.log(x + y);
```
With longer labels:
```js {"A":1} {"B. This is a fairly long label and it needs i... | code_snippets | ||
9da58e2a-d42e-4361-a160-b78e0b8da42d | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/demo/s/test-snippet.md | unknown | 13560d3c-1c0e-4cab-87ad-c9724b0b4589 | 5 | SemanticChunker@1.0.0 | b136a450eaf6c270109987bb5dd1bad038a09adddbf0ad7d981915b10dadff07 | [Headings > Code]
## Code
**Code** is a key element in a website called _30 seconds of code_. Sometimes, it's `inline`, other times it's not. You might also have a key like <kbd>Cmd</kbd> in the text. | unknown | unknown | [Headings > Code]
## Code
**Code** is a key element in a website called _30 seconds of code_. Sometimes, it's `inline`, other times it's not. You might also have a key like <kbd>Cmd</kbd> in the text. | [Headings > Code]
## Code
**Code** is a key element in a website called _30 seconds of code_. Sometimes, it's `inline`, other times it's not. You might also have a key like <kbd>Cmd</kbd> in the text. | code_snippets | ||
a97f4b30-b473-4367-9c08-c7b5a9e745c1 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/demo/s/test-snippet.md | unknown | 13560d3c-1c0e-4cab-87ad-c9724b0b4589 | 10 | SemanticChunker@1.0.0 | 6479e7b8bd1835116d470dab661ac2fe4498503f5bea3efc58cf9abf81a44884 | [Code > CSS code with swatches]
### CSS code with swatches
```css
.my-element {
color: #ff0000;
boder: 1px solid #00ff00;
background-color: linear-gradient(to right, #0000ff 0%, #00ffff 50%);
}
``` | unknown | unknown | [Code > CSS code with swatches]
### CSS code with swatches
```css
.my-element {
color: #ff0000;
boder: 1px solid #00ff00;
background-color: linear-gradient(to right, #0000ff 0%, #00ffff 50%);
}
``` | [Code > CSS code with swatches]
### CSS code with swatches
```css
.my-element {
color: #ff0000;
boder: 1px solid #00ff00;
background-color: linear-gradient(to right, #0000ff 0%, #00ffff 50%);
}
``` | code_snippets | ||
b11edf25-356c-4866-a8d9-7859ecb94bfc | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/demo/s/test-snippet.md | unknown | 13560d3c-1c0e-4cab-87ad-c9724b0b4589 | 22 | SemanticChunker@1.0.0 | 909a982573500dc85e5e6d196578e50e12ae9476dcc6bd778e8ed0c7104e9e93 | [Custom components > Baseline status]
#### Baseline status
As the imported module defines its own `baseline-status` component, we will name ours `baseline-support`. You can check [here](https://github.com/web-platform-dx/web-features) to find the `featureId` value you need.
<baseline-support featureId="font-size-adj... | unknown | unknown | [Custom components > Baseline status]
#### Baseline status
As the imported module defines its own `baseline-status` component, we will name ours `baseline-support`. You can check [here](https://github.com/web-platform-dx/web-features) to find the `featureId` value you need.
<baseline-support featureId="font-size-adj... | [Custom components > Baseline status]
#### Baseline status
As the imported module defines its own `baseline-status` component, we will name ours `baseline-support`. You can check [here](https://github.com/web-platform-dx/web-features) to find the `featureId` value you need.
<baseline-support featureId="font-size-adj... | code_snippets | ||
d490062d-7f2e-4ce3-b725-3e867366e466 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/demo/s/test-snippet.md | unknown | 13560d3c-1c0e-4cab-87ad-c9724b0b4589 | 2 | SemanticChunker@1.0.0 | d14befa3d08ef6696bed366ba91daaf6e73651e70c23f6eb0bdaf474e56bfc09 | [This is a level 2 heading with `some code` > This is a level 3 heading with `some code`]
### This is a level 3 heading with `some code`
- Lists might end up appearing right after a heading.
- We want to make sure they look correct, too. | unknown | unknown | [This is a level 2 heading with `some code` > This is a level 3 heading with `some code`]
### This is a level 3 heading with `some code`
- Lists might end up appearing right after a heading.
- We want to make sure they look correct, too. | [This is a level 2 heading with `some code` > This is a level 3 heading with `some code`]
### This is a level 3 heading with `some code`
- Lists might end up appearing right after a heading.
- We want to make sure they look correct, too. | code_snippets | ||
db2fabc4-11ce-42b5-ac4c-3a01a9c45805 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/demo/s/test-snippet.md | unknown | 13560d3c-1c0e-4cab-87ad-c9724b0b4589 | 16 | SemanticChunker@1.0.0 | 1a3f5d62177543d6e203c5fe8e751b4762638ab31f8298bfdf5ffd81a13f1218 | [Other elements > Admonitions]
### Admonitions
> [!NOTE]
>
> Useful information that users should know, even when skimming content.
> [!TIP]
>
> Helpful advice for doing things better or more easily.
> [!IMPORTANT]
>
> Key information users need to know to achieve their goal.
> [!WARNING]
>
> Urgent info that need... | unknown | unknown | [Other elements > Admonitions]
### Admonitions
> [!NOTE]
>
> Useful information that users should know, even when skimming content.
> [!TIP]
>
> Helpful advice for doing things better or more easily.
> [!IMPORTANT]
>
> Key information users need to know to achieve their goal.
> [!WARNING]
>
> Urgent info that need... | [Other elements > Admonitions]
### Admonitions
> [!NOTE]
>
> Useful information that users should know, even when skimming content.
> [!TIP]
>
> Helpful advice for doing things better or more easily.
> [!IMPORTANT]
>
> Key information users need to know to achieve their goal.
> [!WARNING]
>
> Urgent info that need... | code_snippets | ||
ec4204dc-5979-4c6a-bbf4-b6b05a24c2d5 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/demo/s/test-snippet.md | unknown | 13560d3c-1c0e-4cab-87ad-c9724b0b4589 | 20 | SemanticChunker@1.0.0 | 8570bb9f7dee2c6347c992eaadc5f0c84f0091df46110dbad021e3d0c6338a08 | [Custom components > Code tabs]
```
```js title="Bank.js"
class Bank {
static defaultBank;
exchangeRates;
constructor() {
this.exchangeRates = new Map();
}
setRate(from, to, rate) {
const fromCurrency = Currency.wrap(from);
const toCurrency = Currency.wrap(to);
const exchangeRate = Number.parseFloat(rate)... | unknown | unknown | [Custom components > Code tabs]
```
```js title="Bank.js"
class Bank {
static defaultBank;
exchangeRates;
constructor() {
this.exchangeRates = new Map();
}
setRate(from, to, rate) {
const fromCurrency = Currency.wrap(from);
const toCurrency = Currency.wrap(to);
const exchangeRate = Number.parseFloat(rate)... | [Custom components > Code tabs]
```
```js title="Bank.js"
class Bank {
static defaultBank;
exchangeRates;
constructor() {
this.exchangeRates = new Map();
}
setRate(from, to, rate) {
const fromCurrency = Currency.wrap(from);
const toCurrency = Currency.wrap(to);
const exchangeRate = Number.parseFloat(rate)... | code_snippets | ||
f126e988-b245-4bd5-9170-43d16a0cfcd3 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/demo/s/test-snippet.md | unknown | 13560d3c-1c0e-4cab-87ad-c9724b0b4589 | 12 | SemanticChunker@1.0.0 | ffddf77015a4ddedda97e88797b81c4cb7cfd871ec11f8ceee304a21112f86ca | [Other elements > Blockquotes]
### Blockquotes
> This is a blockquote by some not-so-famous person. It's important to make sure it looks good, too. Let's also throw in a tiny bit of `code` for good measure.
> And this is a multi-paragraph blockquote.
>
> Notice how it's a little different. | unknown | unknown | [Other elements > Blockquotes]
### Blockquotes
> This is a blockquote by some not-so-famous person. It's important to make sure it looks good, too. Let's also throw in a tiny bit of `code` for good measure.
> And this is a multi-paragraph blockquote.
>
> Notice how it's a little different. | [Other elements > Blockquotes]
### Blockquotes
> This is a blockquote by some not-so-famous person. It's important to make sure it looks good, too. Let's also throw in a tiny bit of `code` for good measure.
> And this is a multi-paragraph blockquote.
>
> Notice how it's a little different. | code_snippets | ||
f60c608b-f16d-4f88-a755-1ad83528c223 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/demo/s/test-snippet.md | unknown | 13560d3c-1c0e-4cab-87ad-c9724b0b4589 | 0 | SemanticChunker@1.0.0 | 01eb6910d2e6d1aae07216a577a0e7a91a143e2a9d1328fecd4f11cb456bc389 | ---
title: This is a test snippet, in JavaScript
language: javascript
tags: [link]
cover: do-more-computer
excerpt: This is a test snippet, do not publish it!
listed: false
dateModified: 2100-12-31
---
This is a **test** snippet. It is intended to provide a centralized place to _test_ all sorts of markdown content tha... | unknown | unknown | ---
title: This is a test snippet, in JavaScript
language: javascript
tags: [link]
cover: do-more-computer
excerpt: This is a test snippet, do not publish it!
listed: false
dateModified: 2100-12-31
---
This is a **test** snippet. It is intended to provide a centralized place to _test_ all sorts of markdown content tha... | ---
title: This is a test snippet, in JavaScript
language: javascript
tags: [link]
cover: do-more-computer
excerpt: This is a test snippet, do not publish it!
listed: false
dateModified: 2100-12-31
---
This is a **test** snippet. It is intended to provide a centralized place to _test_ all sorts of markdown content tha... | code_snippets | ||
f9b7ea8b-f49d-4876-bb50-149a2e31bf07 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/demo/s/test-snippet.md | unknown | 13560d3c-1c0e-4cab-87ad-c9724b0b4589 | 13 | SemanticChunker@1.0.0 | 8a69052dda2ce2ca3799e68bb14f2d8b9ff90f53fe47f92c201c4816b01c7e18 | [Other elements > Special inline elements]
### Special inline elements
Some other elements appear less frequently. Namely there's <small>small text</small>, which is relatively uncommon, exponents that look like <sup>this</sup> and this weird <sub>sub thing</sub> that we don't really use anywhere. | unknown | unknown | [Other elements > Special inline elements]
### Special inline elements
Some other elements appear less frequently. Namely there's <small>small text</small>, which is relatively uncommon, exponents that look like <sup>this</sup> and this weird <sub>sub thing</sub> that we don't really use anywhere. | [Other elements > Special inline elements]
### Special inline elements
Some other elements appear less frequently. Namely there's <small>small text</small>, which is relatively uncommon, exponents that look like <sup>this</sup> and this weird <sub>sub thing</sub> that we don't really use anywhere. | code_snippets | ||
2c6c08cd-5c58-48fa-8bfa-5b5699c17163 | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/css/s/zoomin-zoomout-animation.md | unknown | 1c596dfa-6fba-4734-a7f2-4d315e98ea11 | 0 | SemanticChunker@1.0.0 | d4be624cf081af9191e2d9745c0b2b58f497502e107493135de10c9ad5bc4392 | ---
title: Simple Zoom in zoom out animation in CSS
shortTitle: Zoom in zoom out animation
language: css
tags: [animation]
cover: travel-mug-2
excerpt: Create a simple zoom in zoom out animation in CSS and elevate your designs.
listed: true
dateModified: 2024-08-28
---
A simple zoom in zoom out animation can add a tou... | unknown | unknown | ---
title: Simple Zoom in zoom out animation in CSS
shortTitle: Zoom in zoom out animation
language: css
tags: [animation]
cover: travel-mug-2
excerpt: Create a simple zoom in zoom out animation in CSS and elevate your designs.
listed: true
dateModified: 2024-08-28
---
A simple zoom in zoom out animation can add a tou... | ---
title: Simple Zoom in zoom out animation in CSS
shortTitle: Zoom in zoom out animation
language: css
tags: [animation]
cover: travel-mug-2
excerpt: Create a simple zoom in zoom out animation in CSS and elevate your designs.
listed: true
dateModified: 2024-08-28
---
A simple zoom in zoom out animation can add a tou... | code_snippets | ||
b0c47091-cf2b-4278-ac65-3e13c5c8cc4d | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/git/s/configure-default-text-editor.md | unknown | 2b2b3907-f9f7-49df-9d7a-2054a151ca55 | 0 | SemanticChunker@1.0.0 | 277a4394cb64729ddcf246ef49a8debe55d0758461bda62cc87aae8cba8e3e03 | ---
title: Configure Git's default text editor
shortTitle: Configure text editor
language: git
tags: [configuration]
cover: purple-sunset-beach
excerpt: Learn how to configure the text editor used by Git for commit messages and other text editing tasks.
listed: true
dateModified: 2024-04-09
---
Tired of having to use ... | unknown | unknown | ---
title: Configure Git's default text editor
shortTitle: Configure text editor
language: git
tags: [configuration]
cover: purple-sunset-beach
excerpt: Learn how to configure the text editor used by Git for commit messages and other text editing tasks.
listed: true
dateModified: 2024-04-09
---
Tired of having to use ... | ---
title: Configure Git's default text editor
shortTitle: Configure text editor
language: git
tags: [configuration]
cover: purple-sunset-beach
excerpt: Learn how to configure the text editor used by Git for commit messages and other text editing tasks.
listed: true
dateModified: 2024-04-09
---
Tired of having to use ... | code_snippets | ||
1a0daa90-3f83-4672-9af7-a4069ff97eae | unknown | file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/git/s/branches-containing-commit.md | unknown | 8edf695a-6064-494c-bfbe-15d72297e29e | 0 | SemanticChunker@1.0.0 | fc5250d0009b86d65ee910b9b2340fce4f50727113ef1d2c08b8d76928ccfa5a | ---
title: Find branches containing a specific Git commit
shortTitle: Find branches containing commit
language: git
tags: [branch,commit]
cover: dark-leaves
excerpt: Learn how to filter branches based on whether they contain a specific commit or not.
listed: true
dateModified: 2023-05-25
---
Commits are the building b... | unknown | unknown | ---
title: Find branches containing a specific Git commit
shortTitle: Find branches containing commit
language: git
tags: [branch,commit]
cover: dark-leaves
excerpt: Learn how to filter branches based on whether they contain a specific commit or not.
listed: true
dateModified: 2023-05-25
---
Commits are the building b... | ---
title: Find branches containing a specific Git commit
shortTitle: Find branches containing commit
language: git
tags: [branch,commit]
cover: dark-leaves
excerpt: Learn how to filter branches based on whether they contain a specific commit or not.
listed: true
dateModified: 2023-05-25
---
Commits are the building b... | code_snippets |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.