Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(gatsby-theme-minimal-blog): font-size on mobile iOS #421

Merged
merged 2 commits into from
Jun 11, 2020
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 @@ -49,6 +49,41 @@ var treePromise = new Promise(function(resolve) {
});
```

A code block with a JSDoc comment, short, and long comment:

```js
/**
* Get value out of string (e.g. rem => px)
* If value is px strip the px part
* If the input is already a number only return that value
* @param {string | number} input
* @param {number} [rootFontSize]
* @return {number} Number without last three characters
* @example removeLastThree('6rem') => 6
*/
const getValue = (input, rootFontSize = 16) => {
if (typeof input === `number`) {
return input / rootFontSize;
}

const isPxValue = input.slice(-2) === `px`;

if (isPxValue) {
return parseFloat(input.slice(0, -2));
}

return parseFloat(input.slice(0, -3));
};

// This is a little helper function
const helper = (a, b) => a + b;

// This is also a little helper function but this time with a really long one-line comment that should show some more details
const morehelper = (a, b) => a * b;

export { getValue, helper, morehelper };
```

Normal block without language:

```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ Half-giant jinxes peg-leg gillywater broken glasses large black dog Great Hall.

Exume lumos protego leviosa. Aresto expecto engorgio engorgio leviosa legilimens stupefy incantartem mobilarbus accio funnunculus. Serpensortia locomotor incarcerous aguamenti colloportus. Totalus morsmordre stupefy charm- aresto me momentum incarcerous lacarnum locomotor. Revelio relashio veritaserum impedimenta expecto quietus. Legilimens crucio hover cruciatus alohomora tarantallegra petrificus petrificus charm mortis. Nox lumos crucio expecto aparecium lacarnum charm rictusempra pepperup.

---

Sectumsempra aresto exume reducio momentum tarantallegra patronum. Totalus amortentia momentum mortis quietus evanesco. Aparecium mobilicorpus aparecium petrificus engorgio evanesco aparecium. Incarcerous serpensortia petrificus conjunctivitis deletrius immobilus sonorous mortis episkey impedimenta. Immobilus lacarnum totalus protean. Funnunculus exume serpensortia inflamarae relashio alohomora locomotor inflamarae lumos. Skele-gro totalus.

Legilimens colloportus aparecium aresto aparecium leviosa unctuous inflamarae. Quietus mobilarbus incarcerous stupefy confundus leviosa. Quietus funnunculus leviosa evanesco babbling evanesco lumos expecto incarcerous mortis.
Expand Down
3 changes: 3 additions & 0 deletions themes/gatsby-theme-minimal-blog/src/components/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ const Layout = ({ children, className }: LayoutProps) => (
"*": {
boxSizing: `inherit`,
},
html: {
"-webkit-text-size-adjust": `100%`,
},
"::selection": {
backgroundColor: theme.colors.text,
color: theme.colors.background,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,9 @@ const theme = merge(tailwind, {
verticalAlign: `top`,
borderBottomWidth: `1px`,
},
hr: {
mx: 0,
},
},
layout: {
container: {
Expand Down