npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@sap/ui5-webcomponents-vscode-css-mapping

v1.0.1

Published

The CSS Mapping of UI5 WebComponents to VSCode

Downloads

11

Readme

ui5-webcomponents-vscode-css-mapping

The CSS Variable Mapping from UI5 Web Components / Open UI5 to VSCode theming variables in CSS format.

Background in Webview UI Development

  1. To develop the VSCode extensions with Webview UI, the Webview UI Toolkit for VSCode can fit well and be convenient to use in many scenarios.
  2. Sometimes when the Webview UI Toolkit for VSCode is not enough, or there have been massive existing UI elements made with UI5 libraries, this mapping can save some efforts to deal with detailed styling in UI controls, with native support of different VSCode themes.

Prerequisites

  • You're using @ui5/webcomponents or openui5 as the UI Library.
  • [Optional] Build your app with modern bundlers like webpack, esbuild and etc, or with tool-chains like @angular/cli or react-scripts.

Installation

If you're using modern bundlers with components like css-loader to build your app, it's quite easy for you to introduce this mapping in 2 steps.

  1. In your project, run npm install @sap/ui5-webcomponents-vscode-css-mapping
  2. In the index.ts or app.ts:
    import "@sap/ui5-webcomponents-vscode-css-mapping/dist/vscode-to-ui5-webcomponents.css";
    import "@sap/ui5-webcomponents-vscode-css-mapping/dist/quartz-legends.css"; // optional when using @ui5/webcomponents or SAPUI5(OpenUI5)
  3. Start enjoying the seamless theme switching in VSCode/BAS.

If you're not using any bundling tools, it's also workable (but not recommended):

  1. In your project, run npm install @sap/ui5-webcomponents-vscode-css-mapping
  2. Copy these files to your preferred location, e.g., into assets/styles/ folder.
    • node_modules/@sap/ui5-webcomponents-vscode-css-mapping/dist/vscode-to-ui5-webcomponents.css => assets/styles/vscode-to-ui5-webcomponents.css
    • node_modules/@sap/ui5-webcomponents-vscode-css-mapping/dist/quartz-legends.css => assets/styles/quartz-legends.css
  3. Refer to them in index.html:
    <head>
        <link rel="stylesheet" href="styles/vscode-to-ui5-webcomponents.css">
        <link rel="stylesheet" href="styles/quartz-legends.css"> <!-- optional when using @ui5/webcomponents or SAPUI5(OpenUI5) -->
    </head>
  4. Start enjoying the seamless theme switching.

In case that the definitions of any variables were missing, we also provided fallback variable definitions in some files. At present there're 2 types of fallback: light and dark.

To consume styles with fallback, just add the type of fallback as suffix of file path, like:

   <head>
        <link rel="stylesheet" href="styles/vscode-to-ui5-webcomponents-light.css">
   </head>