![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@umbraco-ui/uui-css
Advanced tools
UUI-CSS package contains css files which can be included in your project or components if needed
uui-font
class on your root element.uui-font
. Set the uui-text
class on the element covering the scope of interest, this can be your root element. And if you want to use the styling inside a Shadow dom, that will have to have the uui-text
class as well. See Applying the uui-css styling in the root.
See examplesBundle:
uui-font
and uui-text
classes.Preview on Storybook
For the best results you should include the uui-css.css
bundle in your project, which contains all the css files and custom variables:
<!-- Latest Version -->
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/@umbraco-ui/uui-css@latest/dist/uui-css.css" />
<!-- Specific version -->
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/@umbraco-ui/uui-css@x.x.x/dist/uui-css.css" />
If you want to have fine-grained control over the CSS files, you can install the @umbraco-ui/uui-css
package.
npm i @umbraco-ui/uui-css
For a build system like Vite, the styling could be included like this if you want to control the styling and variables with the build system:
// app.ts
import '@umbraco-ui/uui-css/dist/custom-properties.css';
import '@umbraco-ui/uui-css/dist/uui-font.css';
import '@umbraco-ui/uui-css/dist/uui-text.css';
Or you can just import the compiled bundle at once:
// app.ts
import '@umbraco-ui/uui-css/dist/uui-css.css';
Using the uui-font
and uui-text
<body class="uui-font uui-text">
<div id="app">
<h1>Hello uui-css!</h1>
<p>
Everything inside my app will now use the font from uui-font and tag
styling from uui-text because the root(body) has the uui-font and uui-text
classes.
</p>
</div>
</body>
Using the custom properties:
<p style="background: var(--uui-interface-surface-alt);">
I will now have a background color from the custom properties.
</p>
Full example:
<!doctype html>
<html>
<head>
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/@umbraco-ui/uui-css@latest/dist/uui-css.css" />
</head>
<body class="uui-font uui-text">
<div id="app">
<h1>Hello uui-css!</h1>
<p>
Everything inside my app will now use the font from uui-font and tag
styling from uui-text because the root(body) has the uui-font and
uui-text classes.
</p>
<p style="background: var(--uui-interface-surface-alt);">
I will have a background color from the custom properties.
</p>
</div>
</body>
</html>
Import the text css from uui-css
import { UUITextStyles } from '@umbraco-ui/uui-css';
Add the css to the component styles
static styles = [
UUITextStyles,
css`
/* your css goes here */
`,
];
Add the uui-text
class to the root of the component
<div class="uui-text">This is my custom element</div>
Full example:
import { html, css, LitElement } from 'lit';
import { customElement } from 'lit/decorators.js';
import { UUITextStyles } from '@umbraco-ui/uui-css';
@customElement('my-element')
export class MyElement extends LitElement {
render() {
return html`
<div class="uui-text">
This is my custom element
</div>
`;
}
static styles = [
UUITextStyles,
css`
/* your css goes here */
`,
];
}
declare global {
interface HTMLElementTagNameMap {
'my-element': MyElement;
}
}
FAQs
Umbraco UI css component
The npm package @umbraco-ui/uui-css receives a total of 494 weekly downloads. As such, @umbraco-ui/uui-css popularity was classified as not popular.
We found that @umbraco-ui/uui-css demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.