Skip to content

Commit

Permalink
Merge pull request #30 from taga3s/fix/filename-ui
Browse files Browse the repository at this point in the history
fix: filename ui styling
  • Loading branch information
taga3s authored Sep 16, 2024
2 parents 525f49f + 1beb840 commit b99b6c4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/modules/rehype-momiji/buildCodeBlockHTML.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ const buildCodeBlockHTML = (
) {
node.properties = {
class: node.properties.class,
style: `${node.properties.style}; padding-top: 0px;`,
style: `${node.properties.style}; padding-top: 48px;`,
tabindex: node.properties.tabindex,
};

node.children.unshift({
type: "element",
tagName: "div",
properties: {
style: `width: fit-content; margin-bottom: 16px; padding: 4px 8px; font-size: 14px; border-radius: 0 0 4px 4px; ${filenameColorStyle}`,
style: `position: absolute; top: 0; left: 16px; width: fit-content; margin-bottom: 16px; padding: 4px 8px; font-size: 14px; border-radius: 0 0 4px 4px; ${filenameColorStyle}`,
},
children: [
{
Expand Down
2 changes: 1 addition & 1 deletion app/modules/rehype-momiji/rehypeMomiji.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ const rehypeMomiji: Plugin = (options: Options = {}) => {
);

const container = `
<div style="display: flex; flex-direction: column; gap: 2px;">
<div style="position: relative; display: flex; flex-direction: column; gap: 2px;">
${highlightCode}
</div>
`;
Expand Down

0 comments on commit b99b6c4

Please sign in to comment.