High performant and high fidelity previews for CSS preprocessing frameworks
AssigneeOracle International Corporation
InventorsChristian David Straub, Peter Tehchuan Liu
Life of this patent
Estimating the term…
Abstract
In various embodiments, methods, systems, and non-transitory computer-readable media are disclosed that allow allows developers of user interfaces to see quick and accurate previews after changing content that needs to be processed via a cascading style sheet (CSS) framework such as LESS, SASS, or Trinidad. These frameworks typically take a significant period of time to transform their framework code into CSS.
Claims16
A method comprising:
- receiving, by a computer system, cascading style sheet (CSS) source code written in CSS preprocessor language;
- generating, by the computing system, a CSS preview using a CSS preprocessor in response to receiving the CSS source code;
- segmenting, by the computer system, the CSS source code into a plurality of partitions, wherein the segmenting comprises determining a dependency of each partition in the plurality of partitions;
- receiving, by the computing system, a change to the CSS source code;
- identifying, by the computing system, a partition of the CSS source code affected by the change, wherein the partition is identified from the plurality of partitions segmented from the CSS source code, each partition is a segment of the CSS preprocessor language defined based on a policy so that the partition is a discreet configurable unit of the CSS preprocessor, and the policy includes a policy criteria that a partition can only have as a dependency other partitions;
- determining, by the computing system, whether the computing system has instructions for the identified partition that indicate how to apply one or more operations to obtain a first result of the change;
- generating, by the computing system, the first result in response to applying the one or more operations to the identified partition when the computing system has the instructions;
- and
- injecting, by the computer system, the first result into the CSS preview when the computing system has the instructions,
- wherein the first result is injected in the CSS preview according to the dependencies of the identified partition in the plurality of partitions, and
- wherein the computing system has the instructions when the identified partition is sufficiently normalized to exclude elements written in the CSS preprocessor language such that the first result can be generated by the computing system using the instructions without having to use the CSS preprocessor.
A non-transitory computer-readable medium storing a computer program product having a set of instructions which when executed by one or more processors associated with a computer system cause the one or more processors to:
- receive cascading style sheet (CSS) source code written in CSS preprocessor language;
- generate a CSS preview using a CSS preprocessor in response to receiving CSS source code;
- segment the CSS source code into a plurality of partitions, wherein the segmenting comprises determining a dependency of each partition in the plurality of partitions;
- receive a change to the CSS source code;
- identify partition of the CSS source code affected by the change, wherein the partition is identified from the plurality of partitions segmented from the CSS source code, each partition is a segment of a CSS preprocessor language defined based on a policy so that the partition is a discreet configurable unit of the CSS preprocessor, and the policy includes a policy criteria that a partition can only have as a dependency other partitions;
- determine whether the computing system has instructions for the identified partition that indicate how to apply one or more operations to obtain a first result of the change;
- generate the first result in response to applying the one or more operations to the identified partition when the computing system has the instructions;
- send the change and the identified partition to a service that hosts the CSS preprocessor when the computing system does not have the instructions;
- receive a second result generated by the service applying the CSS preprocessor to the identified partition with the change;
- and
- inject the first result or the second result into the CSS preview,
- wherein the first result is injected in the CSS preview according to the dependencies of the identified partition in the plurality of partitions, and
- wherein the computing system has the instructions when the identified partition is sufficiently normalized to exclude elements written in the CSS preprocessor language such that the first result can be generated by the computing system using the instructions without having to use the CSS preprocessor.
A system comprising:
- a hardware processor;
- and
- a memory storing a set of instructions which when executed by the processor cause the processor to:
- receive cascading style sheet (CSS) source code written in CSS preprocessor language;
- generate a CSS preview using a CSS preprocessor in response to receiving CSS source code;
- segment the CSS source code into a plurality of partitions, wherein the segmenting comprises determining a dependency of each partition in the plurality of partitions;
- receive a change to the CSS source code;
- identify partition of the CSS source code affected by the change, wherein the partition is identified from the plurality of partitions segmented from the CSS source code, each partition is a segment of a CSS preprocessor language defined based on a policy so that the partition is a discreet configurable unit of the CSS preprocessor, and the policy includes a policy criteria that a partition can only have as a dependency other partitions;
- determine whether the system has instructions for the identified partition that indicate how to apply one or more operations to obtain a first result of the change;
- generate the first result in response to applying the one or more operations to the identified partition when the system has the instructions;
- send the change and the identified partition to a service that hosts the CSS preprocessor when the system does not have the instructions;
- receive a second result generated by the service applying the CSS preprocessor to the identified partition with the change;
- and
- inject the first result or the second result into the CSS preview,
- wherein the first result is injected in the CSS preview according to the dependencies of the identified partition in the plurality of partitions, and
- wherein the system has the instructions when the identified partition is sufficiently normalized to exclude elements written in the CSS preprocessor language such that the first result can be generated by the system using the instructions without having to use the CSS preprocessor.
Dependencies are inferred from the claim text.