mcpField
A
arcgis-html-css

arcgis-html-css

github.com/valdesrosierDesign & UI894 installsUpdated 4w ago
Repository

About arcgis-html-css

arcgis-html-css is a skill for authoring and repairing HTML and CSS fragments for ArcGIS Online Hub text cards and Map Viewer popups. It accounts for each editor’s markup restrictions and includes accessibility and validation guidance.

Key features

  1. 01Select a profile for Hub cards or popups
  2. 02Create paste-ready HTML and CSS fragments
  3. 03Repair or convert restricted markup
  4. 04Check accessibility and narrow-width behavior
  5. 05Distinguish allowlist and live-editor validation

Use cases

  1. 01Create markup for a Hub text card
  2. 02Prepare HTML and CSS for a Map Viewer popup
  3. 03Adapt markup rejected by an editor
  4. 04Review fragments for accessibility and mobile widths

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/valdesrosier/skills --skill arcgis-html-css

After installing, type/arcgis-html-cssin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

agents/
openai.yaml
references/
hub-text-card.md
map-viewer-popup.md

Details

From the project README

ArcGIS HTML and CSS

ArcGIS Online sanitizes authored markup. Valid browser HTML and CSS can still be removed or changed when saved, and the two supported editors do not share one compatibility contract. Select the constrained-markup profile before writing.

Identify the profile first

Ask when the target is not explicit. Never guess between:

Do not apply these profiles to ArcGIS Enterprise Sites, Experience Builder, embeds, iframes, standalone web pages, or ArcGIS Maps SDK for JavaScript applications.

Popup Arcade is a separate authoring environment. Do not generate or combine Arcade when the requested output is popup HTML/CSS.

Produce a fragment

Return markup that can be pasted directly into the selected editor. Do not emit <html>, <head>, external stylesheets, build tooling, JavaScript, or a standalone application.

For new content:

  1. Confirm the content, links, images, field placeholders, and visual intent.
  2. Use only elements, attributes, URL protocols, and inline CSS allowed by the selected profile.
  3. Prefer simple semantic HTML. In Hub only, use a supported Calcite component when it is the clearest compatible and accessible solution.
  4. Keep layouts usable at narrow popup widths and mobile Hub widths.

For repair or conversion:

  1. Identify what the sanitizer or renderer will reject or alter.
  2. Preserve meaningful content, links, images, hierarchy, and field placeholders before visual fidelity.
  3. Replace unsupported constructs with the closest compatible alternative.
  4. Never silently remove content. List material visual or behavioral compromises after the fragment.
  5. Say plainly when the request requires unsupported scripting or interactivity.

Make accessibility a completion condition

  • Use semantic structure where the profile supports it.
  • Preserve a logical heading order.
  • Give images meaningful alternative text unless they are decorative.
  • Use meaningful link text.
  • Do not communicate meaning through color alone.
  • Check text and interactive-state contrast when choosing colors.
  • Avoid fixed dimensions that clip or overflow at narrow widths.

Repair clear accessibility defects unless that would materially change the requested content; report the conflict when it would.

Validate proportionally

For straightforward fragments, validate every element, attribute, URL protocol, and inline CSS property against the selected profile reference. Review accessibility and narrow-width behavior.

For intricate layouts or behavior not settled by the reference, validate in the live editor when access is available: paste, save, reopen, inspect the persisted markup, and test the rendered result at narrow and wide widths. Label the result accurately as either allowlist-validated or live-editor validated; never claim ArcGIS preserved markup unchanged without testing it.

Treat first-party Esri documentation as authoritative. A dated observed rule may fill a documentation gap, but label it as observed rather than guaranteed. When neither source supports a construct, use a conservative alternative.

Done when

The profile is explicit, the output is a paste-ready fragment, every construct is supported by that profile, accessibility checks pass, compromises are disclosed, and the validation level is stated.

Comments

Markdown supported