Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ In `src/styles.css`, paste the following styles:

```css
body {
font-family: Helvetica, Arial, sans-serif;
font-family: "Helvetica", "Arial", sans-serif;
}

.btn-wrapper {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,8 @@ body {
line-height: 1.25;
font-family:
-apple-system, BlinkMacSystemFont, "Segoe UI", "Apple Color Emoji",
"Segoe UI Emoji", "Segoe UI Symbol", Roboto, Helvetica, Arial, sans-serif;
"Segoe UI Emoji", "Segoe UI Symbol", "Roboto", "Helvetica", "Arial",
sans-serif;
color: hsl(0 0 0.13);

width: 95%;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ body {
box-sizing: border-box;
clear: left;
display: block;
font-family: Arial, sans-serif;
font-family: "Arial", sans-serif;
font-size: 1.6rem;
font-weight: 400;
line-height: 1.25;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,7 @@ body {
/* CHECKBOX STYLES */
.c-cb {
box-sizing: border-box;
font-family: Arial, sans-serif;
font-family: "Arial", sans-serif;
-webkit-font-smoothing: antialiased;
font-weight: 400;
font-size: 1.6rem;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export default {
</script>
<style scoped>
.edit-label {
font-family: Arial, sans-serif;
font-family: "Arial", sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
color: #0b0c0c;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ Next, copy the following CSS into the newly created `<style>` element:

```css
.custom-checkbox > .checkbox-label {
font-family: Arial, sans-serif;
font-family: "Arial", sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
font-weight: 400;
Expand All @@ -357,7 +357,7 @@ Next, copy the following CSS into the newly created `<style>` element:
margin-bottom: 5px;
}
.custom-checkbox > .checkbox {
font-family: Arial, sans-serif;
font-family: "Arial", sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
font-weight: 400;
Expand All @@ -378,7 +378,7 @@ Next, copy the following CSS into the newly created `<style>` element:
box-shadow: inset 0 0 0 2px;
}
.custom-checkbox {
font-family: Arial, sans-serif;
font-family: "Arial", sans-serif;
-webkit-font-smoothing: antialiased;
font-weight: 400;
font-size: 1.6rem;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Then we can add some CSS into the mix to get it looking nice:

```css live-sample___string-concat-name
button {
font-family: "helvetica neue", helvetica, sans-serif;
font-family: "Helvetica Neue", "Helvetica", sans-serif;
letter-spacing: 1px;
text-transform: uppercase;
border: 2px solid rgb(200 200 0 / 60%);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ You can see this in action in the live sample below:

```css hidden live-sample___webkit-background-clip
body {
font-family: impact, sans-serif;
font-family: "impact", sans-serif;
}

h2 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ This behavior helps avoid repetition in your CSS. A common practice is to define
h2 {
font-size: 2em;
color: black;
font-family: Georgia, "Times New Roman", Times, serif;
font-family: "Georgia", serif;
}

.small {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ td {

/* typography */
html {
font-family: "helvetica neue", helvetica, arial, sans-serif;
font-family: "Helvetica Neue", "Helvetica", "Arial", sans-serif;
}

thead th,
Expand Down Expand Up @@ -246,7 +246,7 @@ This is a minor point, and not strictly relevant to styling tables, but we thoug

```css
html {
font-family: Arial, Helvetica, sans-serif;
font-family: "Helvetica", "Arial", sans-serif;
}
```

Expand Down Expand Up @@ -381,7 +381,7 @@ Your finished table design should look like so:

```css hidden live-sample___best-practice-style
html {
font-family: Arial, Helvetica, sans-serif;
font-family: "Helvetica", "Arial", sans-serif;
}

table {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,11 @@ To set a different font for your text, you use the {{cssxref("font-family")}} pr

```css
p {
font-family: Arial;
font-family: "Arial";
}
```

This would make all paragraphs on a page adopt the arial font, which is found on any computer.
This would make all paragraphs on a page adopt the Arial font, which is found on any computer.

> [!NOTE]
> Scrimba's [Web-safe fonts](https://scrimba.com/learn-html-and-css-c0p/~01r?via=mdn) <sup>[_MDN learning partner_](/en-US/docs/MDN/Writing_guidelines/Learning_content#partner_links_and_embeds)</sup> scrim provides an interactive guide to why fonts are important, web-safe fonts, and how to specify fonts in CSS — along with a challenge to test your knowledge.
Expand Down Expand Up @@ -272,7 +272,7 @@ Since you can't guarantee the availability of the fonts you want to use on your

```css
p {
font-family: "Trebuchet MS", Verdana, sans-serif;
font-family: "Trebuchet MS", "Verdana", sans-serif;
}
```

Expand All @@ -293,7 +293,7 @@ Let's add to our previous example, giving the paragraphs a sans-serif font:
```css live-sample___2fonts live-sample___3font-style live-sample___4shadows live-sample___5text-align live-sample___6line-height live-sample___7letter-word-spacing
p {
color: red;
font-family: Helvetica, Arial, sans-serif;
font-family: "Helvetica", "Arial", sans-serif;
}
```

Expand Down Expand Up @@ -372,7 +372,7 @@ h1 + p {
p {
font-size: 1.5rem;
color: red;
font-family: Helvetica, Arial, sans-serif;
font-family: "Helvetica", "Arial", sans-serif;
}
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ The CSS used for the text styling and spacing is as follows:
/* General styles */

html {
font-family: Helvetica, Arial, sans-serif;
font-family: "Helvetica", "Arial", sans-serif;
font-size: 10px;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ As we looked at in [Fundamental text and font styling](/en-US/docs/Learn_web_dev

```css
p {
font-family: Helvetica, "Trebuchet MS", Verdana, sans-serif;
font-family: "Helvetica", "Trebuchet MS", "Verdana", sans-serif;
}
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ body {
}

html {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-family: "Helvetica Neue", "Helvetica", "Arial", sans-serif;
height: 100%;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ button,
}

button::before {
font-family: HeydingsControlsRegular;
font-family: "HeydingsControlsRegular";
font-size: 20px;
position: relative;
content: attr(data-icon);
Expand Down Expand Up @@ -471,7 +471,7 @@ To get started with this example, follow these steps:
}

button::before {
font-family: HeydingsControlsRegular;
font-family: "HeydingsControlsRegular";
font-size: 20px;
position: relative;
content: attr(data-icon);
Expand Down Expand Up @@ -609,7 +609,7 @@ Next, let's look at our button icons:
}

button::before {
font-family: HeydingsControlsRegular;
font-family: "HeydingsControlsRegular";
font-size: 20px;
position: relative;
content: attr(data-icon);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ select,
}

html {
font-family: Arial, Helvetica, sans-serif;
font-family: "Helvetica", "Arial", sans-serif;
}

body {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ This is the first example of code that explains [how to build a custom form widg

.select {
font-size: 0.625em; /* 10px */
font-family: Verdana, Arial, sans-serif;
font-family: "Verdana", "Arial", sans-serif;

box-sizing: border-box;

Expand Down Expand Up @@ -194,7 +194,7 @@ This is the first example of code that explains [how to build a custom form widg

.select {
font-size: 0.625em; /* 10px */
font-family: Verdana, Arial, sans-serif;
font-family: "Verdana", "Arial", sans-serif;

box-sizing: border-box;

Expand Down Expand Up @@ -329,7 +329,7 @@ This is the first example of code that explains [how to build a custom form widg

.select {
font-size: 0.625em; /* 10px */
font-family: Verdana, Arial, sans-serif;
font-family: "Verdana", "Arial", sans-serif;

box-sizing: border-box;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ This is the second example that explain [how to build custom form widgets](/en-U

.select {
font-size: 0.625em; /* 10px */
font-family: Verdana, Arial, sans-serif;
font-family: "Verdana", "Arial", sans-serif;

box-sizing: border-box;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ This is the third example that explain [how to build custom form widgets](/en-US

.select {
font-size: 0.625em; /* 10px */
font-family: Verdana, Arial, sans-serif;
font-family: "Verdana", "Arial", sans-serif;

box-sizing: border-box;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ This is the fourth example that explain [how to build custom form widgets](/en-U

.select {
font-size: 0.625em; /* 10px */
font-family: Verdana, Arial, sans-serif;
font-family: "Verdana", "Arial", sans-serif;

box-sizing: border-box;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ This is the last example that explain [how to build custom form widgets](/en-US/

.select {
font-size: 0.625em; /* 10px */
font-family: Verdana, Arial, sans-serif;
font-family: "Verdana", "Arial", sans-serif;

box-sizing: border-box;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ So now that we have the basic functionality in place, the fun can start. The fol
/* The computations are made assuming 1em equals 16px which is the default value in most browsers.
If you are lost with px to em conversion, try https://nekocalc.com/px-to-em-converter */
font-size: 0.625em; /* this (10px) is the new font size context for em value in this context */
font-family: Verdana, Arial, sans-serif;
font-family: "Verdana", "Arial", sans-serif;

box-sizing: border-box;

Expand Down Expand Up @@ -318,7 +318,7 @@ So here's the result with our three states ([check out the source code here](/en

.select {
font-size: 0.625em; /* 10px */
font-family: Verdana, Arial, sans-serif;
font-family: "Verdana", "Arial", sans-serif;

box-sizing: border-box;

Expand Down Expand Up @@ -439,7 +439,7 @@ So here's the result with our three states ([check out the source code here](/en

.select {
font-size: 0.625em; /* 10px */
font-family: Verdana, Arial, sans-serif;
font-family: "Verdana", "Arial", sans-serif;

box-sizing: border-box;

Expand Down Expand Up @@ -560,7 +560,7 @@ So here's the result with our three states ([check out the source code here](/en

.select {
font-size: 0.625em; /* 10px */
font-family: Verdana, Arial, sans-serif;
font-family: "Verdana", "Arial", sans-serif;

box-sizing: border-box;

Expand Down Expand Up @@ -817,7 +817,7 @@ Check out the [full source code](/en-US/docs/Learn_web_development/Extensions/Fo

.select {
font-size: 0.625em; /* 10px */
font-family: Verdana, Arial, sans-serif;
font-family: "Verdana", "Arial", sans-serif;

box-sizing: border-box;

Expand Down Expand Up @@ -1109,7 +1109,7 @@ Check out the [full source code](/en-US/docs/Learn_web_development/Extensions/Fo

.select {
font-size: 0.625em; /* 10px */
font-family: Verdana, Arial, sans-serif;
font-family: "Verdana", "Arial", sans-serif;

box-sizing: border-box;

Expand Down Expand Up @@ -1427,7 +1427,7 @@ Check out the [source code here](/en-US/docs/Learn_web_development/Extensions/Fo

.select {
font-size: 0.625em; /* 10px */
font-family: Verdana, Arial, sans-serif;
font-family: "Verdana", "Arial", sans-serif;

box-sizing: border-box;

Expand Down Expand Up @@ -1746,7 +1746,7 @@ Check out the [full source code here](/en-US/docs/Learn_web_development/Extensio

.select {
font-size: 0.625em; /* 10px */
font-family: Verdana, Arial, sans-serif;
font-family: "Verdana", "Arial", sans-serif;

box-sizing: border-box;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ Applied to the `@font-face` at-rule, the [`font-display`](/en-US/docs/Web/CSS/@f

```css
@font-face {
font-family: someFont;
font-family: "someFont";
src: url("/path/to/fonts/someFont.woff") format("woff");
font-weight: 400;
font-style: normal;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ Using shorthand properties for defining style rules is good because it uses a ve
```css
#stockTicker {
font-size: 12px;
font-family: Verdana;
font-family: "Verdana";
font-weight: bold;
}
.stockSymbol {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ In this example:
<style type="text/css">
body,
p {
font-family: Verdana, sans-serif;
font-family: "Verdana", sans-serif;
font-size: 12px;
}
</style>
Expand Down
Loading