agentleFS
JuliaPlutoJuliaPluto/Pluto.jl/.cursor/rules/icon-usage.mdc

Pluto.jl / rules

Cursor rule5.4k starsChanged 12 months agoMITView on GitHub

When adding new UI elements

1 other project uses a version of this.

Trending

Less talk lately.about the whole repository

Dec 2025: 0 mentionsJan 2026: 0 mentionsFeb 2026: 0 mentionsMar 2026: 0 mentionsApr 2026: 0 mentionsMay 2026: 1 mentionJun 2026: 20 mentionsJul 2026: 14 mentionsAug 2026: 3 mentionsSep 2026: 2 mentionsOct 2026: 6 mentionsNov 2026: 4 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the JuliaPluto/Pluto.jl repository that our weekly crawl found. There is no adoption data for this file yet.

Most recently taken up by

Who's talking about JuliaPluto/Pluto.jl

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

See all 50

Talked about on GitHub (50 times).

On GitHub · 50

45 more on GitHub
  • Other versions1 project uses a version of this.

    Word for word · 1

    1. fonsp/Pluto.jl★ 5.4k100% same

    Edited · 0

    None found.

    Wrote their own version · 0

    None found.

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • Where files are headingNew Cursor rule files have more rules about planning and tracking tasks, and fewer about code style.

    Of the Cursor rule files we read, the 4,243 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.

  • In this repository3 other files it gives its agents.

The file

Show its rules and text

We split this icon-usage.mdc into the rules it gives an agent

26 rules. About 0 are common, 16 are distinctive, and 10 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈16

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 10

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use Ionicons from CDN: https://cdn.jsdelivr.net/gh/ionic-team/ionicons@5.5.1/src/svg/

    line 49
  2. Distinctive:

    Always pin to version 5.5.1 for consistency

    line 50
  3. Distinctive:

    Use SVG format exclusively

    line 51
  4. Very specific:

    Use em units for icon sizes

    line 56
  5. Very specific:

    Default size should be 1em

    line 57
  6. Very specific:

    Use background-size: contain for proper scaling

    line 58
  7. Very specific:

    Use CSS variables for filters: var(--image-filters)

    line 61
  8. Distinctive:

    Consider dark/light mode compatibility

    line 63
  9. Distinctive:

    Use margin adjustments sparingly and only for fine-tuning

    line 66
  10. Distinctive:

    Prefer flexbox/grid for general layout

    line 67
  11. Very specific:

    Use background-position for precise control

    line 68
  12. Very specific:

    Use <button> for interactive elements

    line 73
  13. Very specific:

    Keep <span> elements empty in HTML

    line 74
  14. Distinctive:

    Add appropriate ARIA labels when needed

    line 75
  15. Distinctive:

    Use descriptive class names indicating purpose

    line 78
  16. Very specific:

    Follow existing patterns in frontend/editor.css

    line 79
  17. Distinctive:

    Consider reduced motion preferences

    line 85
  18. Distinctive:

    Use CDN for consistent caching

    line 88
  19. Distinctive:

    Avoid icon font libraries

    line 90
  20. Very specific:

    Add content to icon <span> elements

    line 95
  21. Distinctive:

    Use inline styles for icons

    line 97
  22. Distinctive:

    Use PNG/JPG for icons

    line 99
  23. Distinctive:

    Keep icon implementation in CSS

    line 103
  24. Distinctive:

    Use consistent sizing patterns

    line 104
  25. Distinctive:

    Follow existing component patterns

    line 105
  26. Distinctive:

    Test icons in both light/dark themes

    line 106

≈ “Common” is an estimate: at least 1 in 5 of the 6,809 Cursor rule 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
icon-usage.mdc
---
description: When adding new UI elements
globs: 
alwaysApply: false
---
# Icon Usage Guide

This guide explains how to implement icons consistently across the frontend codebase.

## HTML Structure

Icons should be implemented using empty `<span>` elements within their parent containers:

```html
<button class="your-button-class">
    <span></span>
</button>
```

## Implementation Methods

### 1. Background Image Method
Used primarily for button icons. Reference example in [frontend/components/ExportBanner.js](mdc:Pluto.jl/frontend/components/ExportBanner.js):

```css
button.toggle_presentation span {
    background-image: url("https://cdn.jsdelivr.net/gh/ionic-team/ionicons@5.5.1/src/svg/easel-outline.svg");
    filter: invert(1);
}
```

### 2. Pseudo-element Method
Used for decorative icons or indicators. Reference example in [frontend/editor.css](mdc:Pluto.jl/frontend/editor.css):

```css
.notify-when-done label::before {
    content: "";
    display: inline-block;
    width: 1em;
    height: 1em;
    background-image: url("https://cdn.jsdelivr.net/gh/ionic-team/ionicons@5.5.1/src/svg/notifications-outline.svg");
    background-size: contain;
    filter: var(--image-filters);
}
```

## Icon Source

- Use Ionicons from CDN: `https://cdn.jsdelivr.net/gh/ionic-team/ionicons@5.5.1/src/svg/`
- Always pin to version 5.5.1 for consistency
- Use SVG format exclusively

## Styling Guidelines

1. Size and Units
   - Use `em` units for icon sizes
   - Default size should be `1em`
   - Use `background-size: contain` for proper scaling

2. Theming
   - Use CSS variables for filters: `var(--image-filters)`
   - For light icons on dark backgrounds: `filter: invert(1)`
   - Consider dark/light mode compatibility

3. Positioning
   - Use margin adjustments sparingly and only for fine-tuning
   - Prefer flexbox/grid for general layout
   - Use `background-position` for precise control

## Best Practices

1. Semantic HTML
   - Use `<button>` for interactive elements
   - Keep `<span>` elements empty in HTML
   - Add appropriate ARIA labels when needed

2. Class Naming
   - Use descriptive class names indicating purpose
   - Follow existing patterns in [frontend/editor.css](mdc:Pluto.jl/frontend/editor.css)
   - Example: `toggle_presentation`, `notify-when-done`

3. Accessibility
   - Ensure sufficient contrast
   - Provide text alternatives where needed
   - Consider reduced motion preferences

4. Performance
   - Use CDN for consistent caching
   - Optimize SVG files
   - Avoid icon font libraries

## Common Pitfalls

1. DO NOT:
   - Add content to icon `<span>` elements
   - Define the icon in JavaScript or import from an icon library
   - Use inline styles for icons
   - Mix different icon libraries
   - Use PNG/JPG for icons
   - Hardcode colors without using CSS variables

2. DO:
   - Keep icon implementation in CSS
   - Use consistent sizing patterns
   - Follow existing component patterns
   - Test icons in both light/dark themes

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.