Skip to content

CSS #73

Closed Answered by maclong9
nonfungibletunji asked this question in Q&A
Discussion options

You must be logged in to vote

Hi there @nonfungibletunji,

Currently the best way to do this is to utilise the Website and Document structs to point to local CSS files. I will detail a simple directory structure and reproduction below:

my-project
├── Package.swift
├── Public
|   └── styles.css
└── Sources
    ├── Home.swift
    └── Application.swift
@import "https://unpkg.com/open-props";
.card {
  border-radius: var(--radius-2);
  padding: var(--size-fluid-3);
  box-shadow: var(--shadow-2);

  &:hover {
    box-shadow: var(--shadow-3);
  }

  @media (--motionOK) {
    animation: var(--animation-fade-in);
  }
}
import WebUI

// MARK: Card Element Protocol
public protocol CardItem {
    var title: String { get }
    var d…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by maclong9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants