Skip to content

Commit

Permalink
fix(mdx-styles): re-design InlineCode, Code and Divider (#751)
Browse files Browse the repository at this point in the history
- Remove all border radius.
- Make `InlineCode` looks lightweight.

issue #700
issue #701
  • Loading branch information
sabertazimi authored Apr 30, 2022
1 parent 9094762 commit 14d787e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 12 deletions.
1 change: 0 additions & 1 deletion components/CodeBlocks/Code.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
@apply mt-0 mb-9;
@apply px-5 pb-1 pt-10;
@apply bg-dark;
@apply rounded-md;

/* TODO: @sabertazimi - Add language specific syntax highlight */
@apply text-light;
Expand Down
15 changes: 6 additions & 9 deletions components/CodeBlocks/InlineCode.module.css
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
.code {
/* Add `!important` to override `antd` styles */
@apply py-0.5 px-2 !important;
@apply font-normal !important;
@apply leading-6 !important;
@apply px-1.5 py-px !important;
@apply border border-solid border-secondary !important;
@apply break-words !important;
@apply border border-solid rounded-lg !important;
@apply shadow-md !important;
@apply font-mono !important;
@apply text-light !important;
@apply bg-primary !important;
@apply border-secondary !important;
@apply font-mono font-normal leading-6 !important;
@apply text-dark !important;
@apply bg-transparent !important;
@apply shadow-xl !important;

font-size: var(--font-size) !important;
}
2 changes: 1 addition & 1 deletion components/MDX/Divider.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Divider from '@components/Divider';

const MDXDivider = (): JSX.Element => (
<Divider className="mx-0 my-12 h-1 rounded-full bg-gradient-primary" />
<Divider className="mx-0 my-12 h-1 bg-gradient-primary" />
);

export default MDXDivider;
2 changes: 1 addition & 1 deletion components/MDX/__snapshots__/MDX.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
exports[`Divider should render correctly (snapshot) 1`] = `
<div>
<div
class="ant-divider ant-divider-horizontal mx-0 my-12 h-1 rounded-full bg-gradient-primary"
class="ant-divider ant-divider-horizontal mx-0 my-12 h-1 bg-gradient-primary"
role="separator"
/>
</div>
Expand Down

1 comment on commit 14d787e

@vercel
Copy link

@vercel vercel bot commented on 14d787e Apr 30, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

blog – ./

blog.tazimi.dev
blog-sabertaz.vercel.app
blog-git-main-sabertaz.vercel.app

Please sign in to comment.