CSS Style Values as Objects for Complex Gradients
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current Cascading Style Sheets (CSS) technologies are limited in expressing complex presentation styles, as they only accept scalar or simple array values, making it difficult to apply arbitrary and complex designs such as linear gradients or polygonal shapes, which are not easily expressible with string values.
Innovation Solution
Allowing CSS property values to be defined as complex objects with subcomponents, enabling the use of class declarations that describe presentation qualities, which can be instantiated and applied to UI objects, thereby overcoming the limitations of scalar values.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If CSS property values are limited to scalar or simple array values, then the syntax remains simple and easy to parse, but the ability to express complex presentation styles such as linear gradients and polygonal shapes is severely limited
Solution Approach 1:
The patent implements nested object structures where style values can contain subcomponents that further define presentation properties. For example, a gradient style object can contain multiple color stops with positions and colors, creating a nested structure that enables complex visual effects while maintaining organized syntax.
Solution Approach 2:
The patent transitions from one-dimensional scalar values to multi-dimensional object structures. Style values are no longer just single numbers or strings but become complex objects with multiple properties (position, color, shape, gradient entries), adding dimensional complexity to express arbitrary designs.
2Adaptability or versatility
If CSS property values are defined as complex objects with subcomponents, then the expressiveness and flexibility of style definitions is improved, but the parsing complexity and processing overhead increase
Solution Approach 1:
The patent segments complex style definitions into discrete, named components. Each subcomponent (such as gradient entries, color stops, or shape parameters) is a separate object with a specific purpose, making the overall structure more manageable and easier to parse systematically through the DOM tree.
Solution Approach 2:
The patent uses class declarations that can be copied and instantiated multiple times. A single class definition can be reused across different style properties, reducing the need to redefine complex structures repeatedly and simplifying parsing by recognizing patterns across identical structures.
3Productivity
If scalar values are used for CSS properties, then the processing speed is faster and the implementation is simpler, but the ability to apply arbitrary and complex designs is restricted
Solution Approach 1:
The patent introduces dynamic style values that can adapt to different requirements. Instead of fixed scalar values, the system uses objects that can be dynamically instantiated, configured, and applied based on the specific design needs, allowing arbitrary designs while maintaining performance through efficient object instantiation and application.
Data Source
AI summary
A method, system, and computer program product for presenting a User Interface (UI), the method includes receiving input defining a value of a presentation property of a UI object as a name of a class declaration, and producing code that when executed, instantiates an object based on the class declaration, the execution of the code applying the object as a style of the UI object.


