Git Product home page Git Product logo

Comments (5)

silverwind avatar silverwind commented on July 21, 2024 2

The monospace font problem is caused by below CSS rule. If I disable it in browser devtools, the monospace rendering is restored.

html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video {
  font-family: "Roboto", Helvetica Neue, Arial, sans-serif;
}

As for the colors, it looks like highlight.js does set appropriate HTML classes, but there is no CSS for those classes present on the page.

from verdaccio.

akasection avatar akasection commented on July 21, 2024 1

The monospace font problem is caused by below CSS rule. If I disable it in browser devtools, the monospace rendering is restored.

html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video {
  font-family: "Roboto", Helvetica Neue, Arial, sans-serif;
}

As for the colors, it looks like highlight.js does set appropriate HTML classes, but there is no CSS for those classes present on the page.

So this code is applied from ThemeReset: https://github.com/verdaccio/verdaccio/blob/master/packages/ui-components/src/Theme/ResetStyles.tsx#L9

and the highlight comes from https://github.com/verdaccio/verdaccio/blob/master/packages/ui-components/src/components/Readme/utils.ts

but somehow the ThemeReset takes precedence, overriding the highlightjs

and the css import may be not working (accidentally): https://github.com/verdaccio/verdaccio/blob/master/packages/ui-components/src/components/Readme/ReadmeLight.tsx#L3

I tried testing verdaccio at 5.12 (default helm chart ver) and the colors seems to be appear normally (though the font style is still broken)

I'm still learning about the codebase so it will take a while for me to understand the root cause, but I'll keep trying to explore it as much as I can.

from verdaccio.

juanpicado avatar juanpicado commented on July 21, 2024 1

Feel free to ask me if to help you speed up

from verdaccio.

mbtools avatar mbtools commented on July 21, 2024 1

@akasection it's probably related to https://github.com/verdaccio/verdaccio/pull/4071/files#diff-29ce1f12c4f6008028d2c7842426ba51cd50d8398025d75ad22a8844944e8ea4 which split the readme into light and dark mode.

from verdaccio.

akasection avatar akasection commented on July 21, 2024

Additional info:

On the disk, the readme property on package.json from the data folder look like this:

"readme": "ESLint configuration for Javascript files.\n\n## How to use\n\n* Set up [CENSORED](https://CENSORED)\n* Install\n```bash\n$ npm install @bukalapak/eslint-config-base -D\n```\n* Extend the config\n```javascript\n{\n  \"extends\": [\n    \"@bukalapak/eslint-config-base\"\n  ]\n}\n```\n* If the project has files other than javascript, add [`import/extensions` setting](https://github.com/benmosher/eslint-plugin-import#importextensions) to the configuration\n```javascript\n{\n  settings: {\n    'import/resolver': {\n      node: {\n        extensions: ['.js', '.vue'], // for vue project\n        extensions: ['.ts'], // for typescript only project\n        // etc…\n      },\n    },\n  },\n}\n```"

from verdaccio.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.