MCPcopy Index your code

hub / github.com/abishekatp/stylers / functions

Functions58 in github.com/abishekatp/stylers

↓ 20 callersFunctionadd_spaces
check if spaces needed to be appended note: this function also reset the pre_line and pre_col to the cureent token's end line and column note: this fu
stylers/src/style/utils.rs:52
↓ 6 callersFunctionbuild_style
This function will build the whole style text as rust TokenStream. This function will take two arguments. ts: TokenStream which is token stream of tex
stylers/src/style/mod.rs:23
↓ 4 callersMethodcss_text
This css_text method will give the whole at-rule as single string value. Note that we the calling function will be responsible for passing token strea
stylers/src/style/css_at_rule.rs:34
↓ 4 callersFunctionrand_class
()
stylers/src/lib.rs:114
↓ 3 callersFunctionparse_group
This parse_group function will parse the TokenTree::Group and return a string. This function will add at most one whitespace even if there are many wh
stylers/src/style/utils.rs:5
↓ 2 callersFunctionbutton_style
()
examples/style_modularized/src/lib.rs:44
↓ 2 callersFunctionget_component_name
first two tokens are for component name and comma. we extract those info in this function
stylers/src/lib.rs:157
↓ 2 callersFunctionparse_at_rule_declaration
Some at rules don't contain another style rule inside them for those rule we can directly parse the string
stylers/src/style_sheet/css_at_rule.rs:65
↓ 2 callersMethodparse_selector
parse_selector method will parse the all parts of selector and add random class to them
stylers/src/style/css_style_rule.rs:88
↓ 2 callersFunctionrun_tests
note: temporarily writing these tests. once find a way to test styler_core module we can discard this. run this command cargo run inside styler_test f
stylers_test/src/style_test.rs:6
↓ 2 callersFunctionwrite_to_file
append if file exists or write it into the new file
stylers/src/lib.rs:121
↓ 1 callersFunctioncat
(dir: &str)
stylers/src/lib.rs:136
↓ 1 callersFunctionlevenshtein
levenshtein edit distance will give number inserterion or deletion or substitution needed to get string t from string s. ref: https://github.com/mbrla
stylers/src/style/css_style_declar.rs:463
↓ 1 callersFunctionmin3
(a: usize, b: usize, c: usize)
stylers/src/style/css_style_declar.rs:492
↓ 1 callersMethodparse
parse method will extract the selector part of the style-rule and parse that selector using parse_selector method.
stylers/src/style/css_style_rule.rs:37
↓ 1 callersMethodparse
This parse method will parse the at-rule tokn stream. Note: this is recursive function it will handle nested at-rules.
stylers/src/style/css_at_rule.rs:60
↓ 1 callersMethodparse
parse and validate the style declaration group and store it in style_css_text.
stylers/src/style/css_style_declar.rs:366
↓ 1 callersMethodparse_from_str
This parse method will parse the at-rule block string. note: this is string version of the parse method in CSSAtRule struct.
stylers/src/style_sheet/css_at_rule.rs:20
↓ 1 callersMethodparse_from_str
note: this is string version of the parse method in CSSStyleDeclaration struct.
stylers/src/style_sheet/css_style_declar.rs:14
↓ 1 callersFunctionparse_property_group
This parse_property_group function will parse the TokenTree::Group and return a string. This parse group will handle some property specific conitions.
stylers/src/style/css_style_declar.rs:499
↓ 1 callersMethodparse_str
parse method will extract the selector part of the style-rule and parse that selector using parse_selector method.
stylers/src/style_sheet/css_style_rule.rs:18
↓ 1 callersMethodstyle_css_text
style_css_text style declaration as text
stylers/src/style/css_style_declar.rs:361
↓ 1 callersFunctionvalidate_property
this function will check if property key exists or not. if not it will suggest the most relevent property.
stylers/src/style/css_style_declar.rs:441
FunctionAbi
(cx: Scope)
examples/style/src/lib.rs:55
FunctionAbi
(cx: Scope)
examples/style_sheet/src/lib.rs:21
FunctionBlueButton
(cx: Scope)
examples/style_modularized/src/lib.rs:25
FunctionBlueButton
(cx: Scope)
examples/style_sheet_str/src/lib.rs:5
FunctionChild
(cx: Scope, class_name: String)
examples/style_parent_child/src/lib.rs:45
FunctionGreenButton
(cx: Scope)
examples/style_str/src/lib.rs:5
FunctionGreenButton
(cx: Scope)
examples/style_modularized/src/lib.rs:5
FunctionHello
(cx: Scope, name: &'static str)
examples/style/src/lib.rs:5
FunctionHello
(cx: Scope, name: &'static str)
examples/style_sheet/src/lib.rs:5
FunctionParent
(cx: Scope)
examples/style_parent_child/src/lib.rs:5
Functionbuild_style
This function will build the whole style text as the String. This build_style is string version of the build_style method from style macro.
stylers/src/style_sheet/mod.rs:10
Methodcss_text
This css_text method will give the whole style-rule as single string value.
stylers/src/style/css_style_rule.rs:30
Methodempty
()
stylers/src/style/css_style_declar.rs:347
Methodfrom_str
This function will take the style block string and parse it. this function will only parse single stryle rule block
stylers/src/style_sheet/css_style_rule.rs:7
Methodfrom_str
This function will take the whole stylesheet content as string and return CSSStyleSheet structure
stylers/src/style_sheet/css_style_sheet.rs:7
Methodfrom_str
This method will parse the at-rule block string and return the CSSAtRule note: this is string version of the parse method in CSSAtRule struct.
stylers/src/style_sheet/css_at_rule.rs:8
Methodfrom_str
note: this is string version of the new method in CSSStyleDeclaration struct.
stylers/src/style_sheet/css_style_declar.rs:5
Functionmain
()
stylers_test/src/main.rs:3
Functionmain
()
examples/style_str/src/main.rs:4
Functionmain
()
examples/style_modularized/src/main.rs:4
Functionmain
()
examples/style/src/main.rs:4
Functionmain
()
examples/style_sheet_str/src/main.rs:4
Functionmain
()
examples/style_parent_child/src/main.rs:4
Functionmain
()
examples/style_sheet/src/main.rs:4
Methodnew
This function will take the token stream of one CSSStyleRule and parse it. Note that we the calling function will be responsible for passing token str
stylers/src/style/css_style_rule.rs:19
Methodnew
This function will take the whole stylesheet content as token stream and return CSSStyleSheet structure
stylers/src/style/css_style_sheet.rs:25
Methodnew
This method will parse the at-rule tokenstream and return teh CSSAtRule HashMap will contain all unique selectors which may be nested inside at-rule.
stylers/src/style/css_at_rule.rs:22
Methodnew
new method parse the style declaration group
stylers/src/style/css_style_declar.rs:353
Functionrun_tests
note: to check why test cases are failing we can use the text compare tools to compare and see the differences between left and right values of a test
stylers_test/src/style_sheet_test.rs:7
Functionstyle
(ts: TokenStream)
stylers/src/lib.rs:22
Functionstyle_sheet
(ts: TokenStream)
stylers/src/lib.rs:39
Functionstyle_sheet_str
(ts: TokenStream)
stylers/src/lib.rs:75
Functionstyle_sheet_test
(ts: TokenStream)
stylers/src/lib.rs:90
Functionstyle_str
(ts: TokenStream)
stylers/src/lib.rs:62
Functionstyle_test
(ts: TokenStream)
stylers/src/lib.rs:104