Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User state types and validations #268

Closed
idoros opened this issue Feb 4, 2018 · 1 comment
Closed

User state types and validations #268

idoros opened this issue Feb 4, 2018 · 1 comment
Labels
core Processing and transforming logic feature New syntax feature or behavior future Intended for future roadmap pseudo-state Pseudo state related

Comments

@idoros
Copy link
Collaborator

idoros commented Feb 4, 2018

pseudo classes with parameters offers a number of built-in types and validations for the argument input of the pseudo-class:

.root {
    -st-states: size( enum(small, medium, large) )
                      fieldName( 
                          string("^user-", maxLength(10) )
                      );
}

We would like to add the ability to extend the parameter system and add custom user types and validations.

:import {
    -st-from: "./user-types.ts";
    -st-named: languageType;
}
.root {
    -st-states: lang( languageType);
}

.root:lang(en) {
    /* will give warnings for unknown language strings 
    and transform the selector into a native selector */
}

To Do: add details of what such a user type extension interface looks like, build in optional validations and options, custom transform...

@idoros idoros added the feature New syntax feature or behavior label Feb 4, 2018
@tomrav tomrav added pseudo-state Pseudo state related future Intended for future roadmap labels Feb 5, 2018
@tomrav tomrav added the core Processing and transforming logic label May 29, 2018
@idoros
Copy link
Collaborator Author

idoros commented Jan 31, 2023

may revisit in the future, but closing for now

@idoros idoros closed this as completed Jan 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Processing and transforming logic feature New syntax feature or behavior future Intended for future roadmap pseudo-state Pseudo state related
Projects
None yet
Development

No branches or pull requests

2 participants