agentleFS
ifer47ifer47/markeron/.cursor/skills/cross-platform-tauri-ui/SKILL.md

cross-platform-tauri-ui

Skill1.2k starsChanged 5 months agoMITView on GitHub

Cross-platform UI styling for MarkerOn Tauri app (macOS WKWebView vs Windows WebView2). Use when styling Vue/CSS, fixing Mac/Windows visual differences, working on settings window, overlay panels, or Tailwind opacity issues on WebKit.

Trending

Quiet since July.thin dataabout the whole repository

Dec 2025: 0 mentionsJan 2026: 0 mentionsFeb 2026: 0 mentionsMar 2026: 0 mentionsApr 2026: 0 mentionsMay 2026: 0 mentionsJun 2026: 0 mentionsJul 2026: 2 mentionsAug 2026: 0 mentionsSep 2026: 0 mentionsOct 2026: 0 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the ifer47/markeron repository that our weekly crawl found: only 2 in all, so this is a hint, not a trend. There is no adoption data for this file yet.

Who's talking about ifer47/markeron

The biggest 2 of 2 mentions linking to the repository that our crawl found. Each line is their own headline.

The file

We split this skill into the rules it gives an agent

10 rules. About 0 are common, 3 are distinctive, and 7 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 7

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Do not call Objective-C on WryWebView inner handle (crashes)

    line 42
  2. Very specific:

    All cross-platform UI colors live in src/style.css as named classes with explicit rgba().

    line 48
  3. Very specific:

    All platforms use the same rgba() values — do not add Mac-only text opacity overrides.

    line 80
  4. Very specific:

    Prefer Teleport to body for new floating UI if it must survive scroll containers (overflow-y-auto on tab content) — see GeneralTab.vue …

    line 95
  5. Distinctive:

    Check if an existing semantic class fits.

    line 129
  6. Very specific:

    If not, add one class (or modifier) in style.css with rgba().

    line 130
  7. Very specific:

    Use the class in Vue — no text-white/XX or border-white/XX in templates.

    line 131
  8. Very specific:

    If borders: use ui-divider-* or settings-card patterns.

    line 137
  9. Very specific:

    Use explicit rgba() at the same values on all platforms — do not add Mac-only opacity bumps.

    line 138
  10. Distinctive:

    Verify Windows unchanged (rgba values match original Tailwind intent).

    line 139

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Cross-Platform Tauri UI (MarkerOn)

Why Mac and Windows look different

1. Different web engines (main cause)

PlatformEngineUsed by
macOSWKWebView (WebKit)Tauri WRY
WindowsWebView2 (Chromium)Tauri WRY

Same Tailwind class can produce different pixels. This is not a "Mac bug" in app logic — it is compositing / alpha blending behavior in WebKit vs Chromium.

2. Tailwind opacity modifiers are the trigger

Tailwind v4 generates classes like text-white/45 → color: rgb(255 255 255 / 45%).

On macOS WebKit these often fail in predictable ways:

  • Borders (border-white/5, /8): render as harsh white outlines
  • Text (text-white/20–/70): render paler than intended; low contrast on #1e1e20
  • Backgrounds (bg-white/4, /10): nearly transparent; active states disappear
  • Semantic colors with alpha (text-green-400/70, bg-accent/30): hue/saturation lost; green looks grey

Safe: solid colors — text-white, text-accent, bg-[#1e1e20], hex/rgb in inline styles.

3. Transparent overlay windows (macOS-only extra issues)

The drawing overlay is a transparent Tauri window. WKWebView additionally needs:

  • overlay-panel-surface (isolation, backface-visibility, contain:paint)
  • Explicit panel background on .overlay-panel (not relying on semi-transparent Tailwind bg)
  • Tauri: set_background_color for overlay; settings window uses macos.rs dark background + transparent title bar
  • Do not call Objective-C on WryWebView inner handle (crashes)

Project convention: semantic rgba classes

All cross-platform UI colors live in src/style.css as named classes with explicit rgba().

Settings window

ClassPurpose
settings-text-brand/title/heading/label/value/muted/subtle/faint/dim/footer/bodyTypography
settings-text-accent, settings-text-accent-linkLinks, accent text
settings-status-successGreen "up to date"
settings-msg-success, settings-msg-errorToast messages
settings-nav-item, settings-nav-item--activeSidebar tabs
settings-toggle-on, settings-toggle-offSwitches
settings-card, settings-card-row, settings-card-desc, settings-card--activeCards
settings-card--popover-hostCard that hosts a dropdown/tooltip — overrides card overflow
settings-btn-accent-outline, settings-btn-accent-primaryAbout page buttons
settings-row-hover, settings-row-hover-strongList row hover
settings-locale-item, settings-locale-item--activeLanguage dropdown
settings-app-iconAbout logo container
settings-progress-track, settings-progress-fillUpdate progress

Overlay panels (space panel, quick colors)

ClassPurpose
overlay-panel, overlay-panel--compactPanel shell
overlay-panel-surfaceWebKit corner bleed fix
overlay-text-section/hint/label/body/secondary/separator/caption/key*Text
overlay-tool-btn, overlay-tool-btn--activeTool buttons
overlay-width-btn, overlay-width-btn--active, overlay-width-line*Stroke width
ui-divider-h/v/b, ui-kbd, ui-select, ui-popover, ui-segment*Shared controls
color-swatch-ring*, color-picker-ring, color-dot-ringColor UI

All platforms use the same rgba() values — do not add Mac-only text opacity overrides.

Settings cards and popovers (overflow)

.settings-card uses overflow: hidden in style.css so rounded borders clip cleanly on macOS WebKit. That clips any child with position: absolute or fixed (dropdowns, tooltips) and sibling cards below can paint over the overflow.

Rules:

  1. Any card that contains a dropdown, tooltip, or popover must also use settings-card--popover-host (overflow: visible).
  2. While the popover is open, raise the host card above siblings (e.g. relative z-20 when open) so the menu is not covered by the next card.
  3. Prefer Teleport to body for new floating UI if it must survive scroll containers (overflow-y-auto on tab content) — see GeneralTab.vue language select for the card-host pattern; Teleport is the more robust default for new work.

Before changing a shared container class (.settings-card, .overlay-panel, scroll wrappers), grep for floating children:

rg "absolute|fixed|ui-popover|ui-tooltip|Teleport" src/components/settings/

Container CSS checklist — these on a parent often break popovers; re-test open state after adding any of them:

PropertyRisk
overflow: hidden / autoClips absolute/fixed descendants
transformNew stacking context; z-index surprises
contain: paintClips overflow
isolation: isolateStacking context; siblings may cover popover

Manual QA after card/style refactors (both platforms, ~2 min):

  • Settings → 常规: language dropdown fully visible, can switch locale
  • Settings → 快捷键: info tooltip visible on hover
  • Scroll the tab if applicable; popover still usable

Development workflow

Adding new UI

  1. Check if an existing semantic class fits.
  2. If not, add one class (or modifier) in style.css with rgba().
  3. Use the class in Vue — no text-white/XX or border-white/XX in templates.
  4. For Help-tab-style scoped CSS, prefer rgba() in <style scoped> (already done in SettingsView.vue help section).

Fixing Mac-only reports

  1. Confirm the component uses Tailwind opacity → migrate to semantic class.
  2. If borders: use ui-divider-* or settings-card patterns.
  3. Use explicit rgba() at the same values on all platforms — do not add Mac-only opacity bumps.
  4. Verify Windows unchanged (rgba values match original Tailwind intent).

Pre-commit grep

rg "border-white/|text-white/|bg-white/|from-accent/|to-accent/|bg-accent/|text-accent/|border-accent/|text-green-|bg-emerald-|text-red-.*/|bg-red-.*/" src/components

Zero hits in src/components is the target for new work.

Manual test matrix

SurfacemacOSWindows
Settings → 常规Toggles, language dropdown open, labelsSame
Settings → 关于Green status, nav highlight, card bordersSame
Space → settings panelText, borders, tool active stateSame
Right-click color panelCaption text, swatch ringsSame

Anti-patterns

<!-- BAD: WebKit opacity issues -->
<span class="text-white/45">Label</span>
<div class="border border-white/8 bg-white/4">

<!-- GOOD -->
<span class="settings-text-muted">Label</span>
<div class="settings-card">
<!-- BAD: dropdown inside .settings-card without popover-host -->
<div class="settings-card">
  <div class="relative">
    <div class="absolute ...">...</div>
  </div>
</div>

<!-- GOOD: allow popover to escape card; raise z-index when open -->
<div class="settings-card settings-card--popover-host" :class="{ 'relative z-20': open }">
  ...
</div>
<!-- BAD: status color with alpha -->
<span class="text-green-400/70">Up to date</span>

<!-- GOOD -->
<span class="settings-status-success">Up to date</span>
/* GOOD: new semantic token */
.settings-text-new-role {
  color: rgba(255, 255, 255, 0.55);
}

Related files

  • src/style.css — all semantic UI classes
  • src-tauri/src/macos.rs — settings window background & title bar
  • index.html — html.settings for settings route

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.