Giter Site home page Giter Site logo

Comments (7)

antfu avatar antfu commented on July 22, 2024

Would you elaborate more on why they are needed?

from shikiji.

gdomingu avatar gdomingu commented on July 22, 2024

These two types are included for high contrast themes from VS code. https://github.com/microsoft/vscode/blob/0a08e6fdcd514741ceb679fb38c746550b5aabf3/src/vs/platform/theme/common/theme.ts#L12-L13

from shikiji.

antfu avatar antfu commented on July 22, 2024

I knew. But it doesn't explain why you need it. High-contrast or not, it might make sense to VS Code as an editor. But we are only focusing on syntax highlighting, where the type is used to infer the default background color. Contrasty is presented in the colors themselves.

from shikiji.

gdomingu avatar gdomingu commented on July 22, 2024

I think it is needed for compatibility with VS code themes. If someone exports a high contract theme from VS code and tries to pass it into shikiji they will get a type error. One of the main selling points of this library is the compatibility with VS code themes.

from shikiji.

antfu avatar antfu commented on July 22, 2024

Can you give a bit more concrete example of what your usage is? Which theme do you want to pass in?

from shikiji.

gdomingu avatar gdomingu commented on July 22, 2024

These themes
https://github.com/microsoft/vscode/blob/main/extensions/theme-defaults/themes/hc_light.json
https://github.com/microsoft/vscode/blob/main/extensions/theme-defaults/themes/hc_black.json

But I notice that type doesn't seem to be present on those JSON files. But shows up when you export the theme in VS code.

from shikiji.

antfu avatar antfu commented on July 22, 2024

#73 (comment)

from shikiji.

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.