Skip to content

Commit

Permalink
feat(GlobalStyles): improve lowercase L (l) and uppercase i (I) reada…
Browse files Browse the repository at this point in the history
…bility (#2995)

* feat(GlobalStyles): improve readability of lowercase L (l) and uppercase i (I)

* chore(Paragraph): update story to reflect changes

* chore: add changelog

* refactor: move property from cssReset to GlobalStyles
  • Loading branch information
cf-remylenoir authored Feb 14, 2025
1 parent 827128a commit 50b070e
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
6 changes: 6 additions & 0 deletions .changeset/kind-sheep-punch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@contentful/f36-core": patch
"@contentful/f36-typography": patch
---

feat(GlobalStyles): improve lowercase L (l) and uppercase i (I) readability
14 changes: 9 additions & 5 deletions packages/components/typography/stories/Paragraph.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ import { Paragraph } from '../src';
export default {
title: 'Typography/Paragraph',
component: Paragraph,
decorators: [
(StoryComponent) => (
<div style={{ maxWidth: '600px' }}>
<StoryComponent />
</div>
),
],
parameters: {
propTypes: [Paragraph['__docgenInfo']],
},
Expand All @@ -21,7 +28,7 @@ export const Basic = (props: ComponentProps<typeof Paragraph>) => (

Basic.args = {
children:
'The quick brown fox jumps over the lazy dog like an over-motivated frog.',
'Ill-informed AI initiatives led Lionel to inspect illegible labels, mistaking mirrored machine-learning models for misplaced Latin inscriptions. In Lisbon, logical layouts and linguistic AI left little illumination, leaving isolated individuals lost in labyrinthine neural networks.',
};

export const WithDensitySupport = (props: ComponentProps<typeof Paragraph>) => {
Expand Down Expand Up @@ -56,7 +63,4 @@ export const WithDensitySupport = (props: ComponentProps<typeof Paragraph>) => {
);
};

WithDensitySupport.args = {
children:
'The quick brown fox jumps over the lazy dog like an over-motivated frog.',
};
WithDensitySupport.args = Basic.args;
2 changes: 2 additions & 0 deletions packages/core/src/GlobalStyles/GlobalStyles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ export const GlobalStyles = ({
font-size: ${tokens.fontSizeM};
line-height: ${tokens.lineHeightM};
font-synthesis-weight: none;
/* Improves readability of lowercase L (l) and uppercase i (I) */
font-feature-settings: 'ss05' on;
}
code {
Expand Down

0 comments on commit 50b070e

Please sign in to comment.