Automatic detection of CSS conflicts
First Claim
1. A method for automatic detection of Cascading Style Sheet (CSS) conflicts, the method comprising:
- receiving, by one or more processors, at least one user interface (UI) constraint and at least one first CSS rule defined by a developer of a widget as well as at least one second CSS rule customized by a user of the widget, and wherein the at least one second CSS rule overrides the at least one first CSS rule, wherein said UI constraints are used to restrict the UI of said widget, wherein the UI constraints validate an appearance of the widget, wherein the at least one first CSS rule and the at least one second CSS rule control the appearance of the widget, wherein said UI constraint is represented by a code segment of simplified syntax found in a customized library of UI constraints;
returning, by one or more processors, a Boolean value in response to the code segment being interpreted to identify the UI constraint by a call to the customized library;
running, by one or more processors, a page containing said widget;
combining, by one or more processors, various combinations of the second CSS rules that have the same properties as the first CSS rules and testing the various combinations of the second CSS rules with each UI constraint until at least one code segment of the UI constraint returns the Boolean value as false, indicating the UI constraint is violated, and the second CSS rules that override the first CSS rules are identified;
performing, by one or more processors, automatic validation on each UI constraint based on a result of running the page using the combinations of the second CSS rules; and
in response to deriving the UI constraint being violated from said automatic validation, finding, by one or more processors, one or more of the second CSS rules from the combinations of the second CSS rules that lead to the violation of the UI constraint.
1 Assignment
0 Petitions
Accused Products
Abstract
A method, system, and/or computer program product automatically detects CSS conflicts. The method comprises: receiving at least one UI constraint and at least one first CSS rule defined by a developer of a widget as well as at least one second CSS rule customized by a user of the widget, the UI constraints being used to restrict the UI of the widget; running a page containing the widget; performing automatic validation on each UI constraint based on the result of running the page; and in response to deriving a UI constraint being violated from the validation, finding one or more of the second CSS rules that lead to violation of the UI constraint in a first set made up of the second CSS rules that override the first CSS rules.
-
Citations
20 Claims
-
1. A method for automatic detection of Cascading Style Sheet (CSS) conflicts, the method comprising:
-
receiving, by one or more processors, at least one user interface (UI) constraint and at least one first CSS rule defined by a developer of a widget as well as at least one second CSS rule customized by a user of the widget, and wherein the at least one second CSS rule overrides the at least one first CSS rule, wherein said UI constraints are used to restrict the UI of said widget, wherein the UI constraints validate an appearance of the widget, wherein the at least one first CSS rule and the at least one second CSS rule control the appearance of the widget, wherein said UI constraint is represented by a code segment of simplified syntax found in a customized library of UI constraints; returning, by one or more processors, a Boolean value in response to the code segment being interpreted to identify the UI constraint by a call to the customized library; running, by one or more processors, a page containing said widget; combining, by one or more processors, various combinations of the second CSS rules that have the same properties as the first CSS rules and testing the various combinations of the second CSS rules with each UI constraint until at least one code segment of the UI constraint returns the Boolean value as false, indicating the UI constraint is violated, and the second CSS rules that override the first CSS rules are identified; performing, by one or more processors, automatic validation on each UI constraint based on a result of running the page using the combinations of the second CSS rules; and in response to deriving the UI constraint being violated from said automatic validation, finding, by one or more processors, one or more of the second CSS rules from the combinations of the second CSS rules that lead to the violation of the UI constraint. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9)
-
-
10. A computer system comprising one or more processors, one or more computer readable memories, and one or more computer readable storage mediums, and program instructions stored on at least one of the one or more storage mediums for execution by at least one of the one or more processors via at least one of the one or more computer readable memories, the stored program instructions comprising:
-
program instructions to receive at least one user interface (UI) constraint and at least one first CSS rule defined by a developer of a widget as well as at least one second CSS rule customized by a user of the widget, and wherein the at least one second CSS rule overrides the at least one first CSS rule, wherein said UI constraints are used to restrict the UI of said widget, wherein the UI constraints validate an appearance of the widget, wherein the at least one first CSS rule and the at least one second CSS rule control the appearance of the widget, wherein said UI constraint is represented by a code segment of simplified syntax found in a customized library of UI constraints; program instructions to return a Boolean value in response to the code segment being interpreted to identify the UI constraint by a call to the customized library; program instructions to run a page containing said widget; program instructions to combine various combinations of the second CSS rules that have the same properties as the first CSS rules and testing the various combinations of the second CSS rules with each UI constraint until at least one code segment of the UI constraint returns the Boolean value as false, indicating the UI constraint is violated, and the second CSS rules that override the first CSS rules are identified; program instructions to perform automatic validation on each UI constraint based on a result of running the page using the combinations of the second CSS rules; and program instructions to, in response to deriving a LE constraint being violated from said automatic validation, find one or more of the second CSS rules that lead to the violation of the UI constraint in a first set made up of the second CSS rules that override the first CSS rules. - View Dependent Claims (11, 12, 13, 14, 15, 16, 17)
-
-
18. A computer program product for automatically detecting Cascading Style Sheet (CSS) conflicts, the computer program product comprising a computer readable storage medium having program code embodied therewith, the program code readable and executable by a processor to perform a method comprising:
-
receiving at least one user interface (UI) constraint and at least one first CSS rule defined by a developer of a widget as well as at least one second CSS rule customized by a user of the widget, and wherein the at least one second CSS rule overrides the at least one first CSS rule, wherein said UI constraints are used to restrict the UI of said widget, wherein the UI constraints validate an appearance of the widget, wherein the at least one first CSS rule and the at least one second CSS rule control the appearance of the widget, wherein said UI constraint is represented by a code segment of simplified syntax found in a customized library of UI constraints; returning, a Boolean value in response to the code segment being interpreted to identify the UI constraint by a call to the customized library; running a page containing said widget; combining, various combinations of the second CSS rules that have the same properties as the first CSS rules and testing the various combinations of the second CSS rules with each UI constraint until at least one code segment of the UI constraint returns the Boolean value as false, indicating the UI constraint is violated, and the second CSS rules that override the first CSS rules are identified; performing automatic validation on each UI constraint based on a result of running the page using the combinations of the second CSS rules; and in response to deriving a UI constraint being violated from said automatic validation, finding one or more of the second CSS rules from the combinations of the second CSS rules that lead to the violation of the UI constraint in a first set made up of the second CSS rules that override the first CSS rules. - View Dependent Claims (19, 20)
-
Specification