mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-12 04:50:18 +00:00
@@ -0,0 +1,16 @@
|
||||
/// <reference path="jss.d.ts" />
|
||||
|
||||
jss.set('.demo', {
|
||||
'font-size': '15px',
|
||||
'color': 'red'
|
||||
});
|
||||
|
||||
jss.get('.demo');
|
||||
|
||||
jss.get();
|
||||
|
||||
jss.getAll('.demo');
|
||||
|
||||
jss.remove('.demo');
|
||||
|
||||
jss.remove();
|
||||
Vendored
+50
@@ -0,0 +1,50 @@
|
||||
// Type definitions for jss v0.6
|
||||
// Project: https://github.com/Box9/jss
|
||||
// Definitions by: Valentin Robert <https://github.com/Ptival/>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
interface Properties {
|
||||
[name: string]: string;
|
||||
}
|
||||
|
||||
interface Selectors {
|
||||
[selector: string]: Properties;
|
||||
}
|
||||
|
||||
interface JSS {
|
||||
/**
|
||||
* Retrieve all rules added via JSS, organized by selectors
|
||||
*/
|
||||
get(): Selectors;
|
||||
|
||||
/**
|
||||
* Retrieve rules added via JSS for a given selector
|
||||
* @param s CSS selector
|
||||
*/
|
||||
get(s: string): Properties;
|
||||
|
||||
/**
|
||||
* Retrieve all rules specified for a given selector (not necessarily added via JSS)
|
||||
* @param s CSS selector
|
||||
*/
|
||||
getAll(s: string): Properties;
|
||||
|
||||
/**
|
||||
* Remove all rules added via JSS
|
||||
*/
|
||||
remove(): void;
|
||||
|
||||
/**
|
||||
* Remove all rules added via JSS for the given selector
|
||||
*/
|
||||
remove(s: string): void;
|
||||
|
||||
/**
|
||||
* Add or extend an existing rule
|
||||
* @param s CSS selector
|
||||
* @param p CSS properties
|
||||
*/
|
||||
set(s: string, p: Properties): void;
|
||||
}
|
||||
|
||||
declare var jss: JSS;
|
||||
Reference in New Issue
Block a user