Fast CSS parser engineered for runtime use
Assigneesalesforce.com, inc.
InventorNathan David McWilliams
Life of this patent
Estimating the term…
Abstract
The technology disclosed relates to systems and methods for providing a CSS parser engineered for runtime usage to improve the maintainability of code that displays data to users. The technology disclosed also improves the performance and consistency of the code that delivers a user's experience.
Claims19
A computer-implemented method of transforming a cascading style sheet (“CSS”) codebase for a website, including:
- using a processor, accessing in memory a CSS codebase that includes target tokens in customizable segments to be customized, responsive to an input invoking a module that uses the CSS codebase;
- selecting at least one set of customization functions among multiple alternative sets of customization functions that transform the target tokens within the customizable segments of the CSS codebase;
- scanning the CSS codebase and locating the customizable segments of the CSS codebase that include the target tokens and at least a block of related key-value pairs, customization of the customizable segments of the CSS codebase being located based at least in part on an attribute of a user;
- parsing, at runtime, only the located customizable segments of the CSS codebase to produce segment parse trees based on the parsed customizable segments;
- and
- transforming the target tokens from the segment parse trees according to the selected set of customization functions and outputting a customized codebase to be used with the module invoked by the input.
A computer-implemented system that transforms a cascading style sheet (“CSS”) codebase for a website, including:
- a processor and first memory, the first memory holding code that, when executed, causes the processor to:
- access in a second memory a CSS codebase that includes target tokens in customizable segments to be customized, responsive to an input invoking a module that uses the CSS codebase;
- select at least one set of customization functions among multiple alternative sets of customization functions that transform the target tokens within the customizable segments of the CSS codebase;
- scan the CSS codebase and locate the customizable segments of the CSS codebase that include the target tokens and at least a block of related key-value pairs, customization of the customizable segments of the CSS codebase being located based at least in part on an attribute of a user;
- parse, at runtime, only the located customizable segments of the CSS codebase to produce segment parse trees based on the parsed customizable segments;
- and
- transform the target tokens from the segment parse trees according to the selected set of customization functions and output a customized codebase to be used with the module invoked by the input.
A non-transitory computer readable storage medium impressed with computer program instructions to transform a cascading style sheet (“CSS”) codebase for a website, the instructions, when executed on a processor, implement a method comprising:
- accessing in a memory a CSS codebase that includes target tokens in customizable segments to be customized, responsive to an input invoking a module that uses the CSS codebase;
- selecting at least one set of customization functions among multiple alternative sets of customization functions that transform the target tokens within the customizable segments of the CSS codebase;
- scanning the CSS codebase and locating the customizable segments of the CSS codebase that include the target tokens and at least a block of related key-value pairs, customization of the customizable segments of the CSS codebase being located based at least in part on an attribute of a user;
- parsing, at runtime, only the located customizable segments of the CSS codebase to produce segment parse trees based on the parsed customizable segments;
- and
- transforming the target tokens from the segment parse trees according to the selected set of customization functions and outputting a customized codebase to be used with the module invoked by the input.
Dependencies are inferred from the claim text.