Skip to content

Commit

Permalink
fix(gatsby-theme-minimal-blog): font-size on mobile iOS (#421)
Browse files Browse the repository at this point in the history
  • Loading branch information
LekoArts authored Jun 11, 2020
1 parent 4b57624 commit ab65ecc
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 0 deletions.
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

0 comments on commit ab65ecc

Please sign in to comment.