login-styling
Skill9 starsChanged 5 months agoMITView on GitHub
Styles the Xsolla Login widget (sign-in, sign-up, password reset): upload custom CSS through the API and attach it to the login project, or set colors, logo, background and social order through themeJSON. Use for "style the login", "brand the sign-in screen", "upload login CSS", "dark-mode login". Pairs with login-setup, which wires the auth flow.
In this repository33 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- .cursor/rules/xsolla-ai-kit.mdcCursor rule
- catalog-designSkill
- description-to-shopSkill
- game-web-portalSkill
- headless-checkout-integrationSkill
- login-setupSkill
- login-stylingSkill
- merchant-setupSkill
- nocode-shop-setupSkill
- productionSkill
- quest-setupSkill
- shop-builder-assemblySkill
- shopbuilder-translateSkill
- shop-setupSkill
- webhooks-implSkill
- xla-pagesSkill
- catalog-designSkill
- description-to-shopSkill
- game-web-portalSkill
- headless-checkout-integrationSkill
- login-setupSkill
- merchant-setupSkill
- nocode-shop-setupSkill
- productionSkill
- quest-setupSkill
- shop-builder-assemblySkill
- shopbuilder-translateSkill
- shop-setupSkill
- webhooks-implSkill
- xla-pagesSkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 22
Use this skill — always alongside login-setup — when the Login UI must look on-brand rather than shipping the Xsolla default:
≈ “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.
Files
Owner: Elnur Khalilov (Login FE) · Last verified: July 2026 · Applies to: Login Widget 2.0 (
login-widget-ng) + Publisher Account Login module. This skill's primary, recommended path is Channel 3 — CSS deployed via API. The other three channels (PA editor, PA CSS upload, SDK) are documented inreferences/channels-and-flag.md.
When to use
Use this skill — always alongside login-setup — when the Login UI
must look on-brand rather than shipping the Xsolla default:
- Deploy arbitrary custom CSS to the Login widget via API (no Publisher Account clicking) — the main flow below
- Apply the game's brand tokens (colors, logo, roundness, background, fonts) to the sign-in, sign-up, and password-reset screens
- White-label / dark-mode the login experience
- Choose between API CSS, Publisher Account CSS, structured
themeJSON, and SDKcustomStyle
Out of scope: wiring the auth flow, OAuth clients, JWT validation (→
login-setup); catalog/storefront visuals (→ catalog-design);
checkout/payment UI styling (→ headless-checkout-integration). CSS cannot change the
widget's layout/structure or inject HTML/JS — see limitations.
Prerequisites
export XSOLLA_MERCHANT_ID=<numeric merchant ID> # e.g. 71070
export XSOLLA_PROJECT_ID=<numeric publisher project ID> # e.g. 300837
export XSOLLA_LOGIN_PROJECT_ID=<login project UUID> # e.g. 2f1ba87f-...
export XSOLLA_PUBLISHER_TOKEN=<Publisher Account bearer token>- A working Login integration from
login-setup— the widget must render before it can be styled. - Signed Xsolla Product Licensing Agreement (PA → Agreements). Widget customization (CSS upload / editor Save) is disabled until it is signed.
- Login Widget 2.0 (
widget_generation > 0). The legacy widget (=== 0) uses a different, limited endpoint — seereferences/channels-and-flag.md. - Xsolla MCP (recommended). These are the exact endpoints the PA frontend itself calls;
they are reliable but not a formally published public API. Verify current shapes with
search_xsolla_sources(or the linked docs) before handing them to a partner as official.
Steps (API-based CSS — Channel 3)
- Author the CSS against stable selectors. Target the widget's BEM class names
(
.app-block,.button-element,.input-container input,.tabs-links__login_tab-link, …) — never the hashedcss-XXXXEmotion classes (they change every build). Load fonts with@font-face, never@import(the sanitizer strips it). Save as plain-text.css(macOS TextEdit saves RTF by default → upload 422s). Full selector list, sanitizer rules, fonts, and worked examples:references/css-reference.md. Upload the CSS file to Xsolla storage (Merchant API).
POSTthe file asmultipart/form-datawith the form field literally namedfile:Method & path POST https://api.xsolla.com/merchant/current/merchants/{XSOLLA_MERCHANT_ID}/filesAuth Authorization: Bearer <XSOLLA_PUBLISHER_TOKEN>Body multipart/form-data, fieldfile=@styles.cssReturns { "file_url": "https://cdn.xsolla.net/.../styles.css" }Attach the returned URL to the login project (Login API).
Method & path POST https://login.xsolla.com/api/projects/{XSOLLA_LOGIN_PROJECT_ID}/custom_style_urlAuth Authorization: Bearer <XSOLLA_PUBLISHER_TOKEN>Body { "custom_style_url": "<file_url from step 2>" }Server-side CSS attached this way is injected as a
<link rel="stylesheet">and is honored under the defaultdisallow_external_style: true— which is why API deployment is the reliable path. (If a project has been flipped tofalse, the SDKcustomStyleparam wins and this uploaded CSS is ignored instead — seereferences/channels-and-flag.md.)- Verify and refresh.
GET https://login.xsolla.com/api/projects/{id}/custom_style_url→ confirm it returns your CDN URL. Then hard-refresh the widget (Ctrl/Cmd+F5) and allow 7–10 min for CDN cache. The CSS applies to every app/site using this login project. - (Optional) structured theme instead of / alongside CSS. For plain colors, logo, roundness,
background, or social order — no CSS file needed — pass
themeJSONvia the SDK; it is never gated by the flag. Keys and defaults:references/css-reference.md.
Common pitfalls
- "We pass
customStylein code but nothing changes." That is the SDK path (Channel 4), gated bydisallow_external_style(defaulttrue→ SDK CSS ignored). Use this skill's API upload instead — it's the path honored under the defaulttrue. Full flag explainer:references/channels-and-flag.md. - Upload returns 422. File isn't plain-text
.css(macOS RTF) or its MIME isn't allowed. Re-save as plain text; confirm it doesn't report "Rich Text Format". - Custom font doesn't load. It was loaded via
@import(stripped by the sanitizer). Switch to@font-face { src: url(...) }. JSON is rejected by the uploader, so self-hostsocialsJSON. - Widget renders all black. An invalid hex in the theme — the merge silently replaces bad
colors with
#000000. Check theme values. - Targeted the hashed
css-XXXXclass → styles break next build. Use the BEM selectors only. - Expecting a pixel-perfect custom layout. CSS can only reskin what's rendered; it cannot reorder/add/remove DOM, inject HTML, or run JS. On Site Builder, the surrounding modal / logo / X belong to Site Builder, not the widget iframe.
Agent test
Prompt: "I've integrated Xsolla Login. Restyle the login widget via API to match my game — brand color #FF6600, rounded buttons, my custom font, and my logo — without me clicking around in Publisher Account."
Expected: the agent loads this skill (+ references) alongside login-setup, writes a plain-text
.css targeting BEM selectors with @font-face (not @import), uploads it via the Merchant API
/files endpoint, attaches the returned CDN URL via the Login API custom_style_url endpoint,
verifies with the GET, and explains the 7–10 min cache + all-apps scope. It does not rely on
the SDK customStyle param (would be blocked by disallow_external_style: true).
⏳ Endpoints verified July 2026 (SERVICE-9991); pending a live sandbox run in this repo.
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
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.

