This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 20231 - DSS [Dynamic Style Sheet] Idea. A separate branch for CSS.
Summary: DSS [Dynamic Style Sheet] Idea. A separate branch for CSS.
Status: NEW
Alias: None
Product: CSS
Classification: Unclassified
Component: General (show other bugs)
Version: unspecified
Hardware: All All
: P2 enhancement
Target Milestone: ---
Assignee: This bug has no owner yet - up for the taking
QA Contact: public-css-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-04 10:19 UTC by Alexei03a
Modified: 2012-12-04 10:19 UTC (History)
1 user (show)

See Also:


Attachments

Description Alexei03a 2012-12-04 10:19:21 UTC
I suggest that a new branch of the DSS. What I mean by DSS? DSS - CSS is a sharp dynamics. His features I figured out a little bit, but I think I love it love it. But remember - "DSS is not JavaScript".




Feature One. Using "import" values. Can use value from previous priority. Example:

.bunk { 
  background-image: import, url(addition.png); //Import from previous stylesheet.
}


Feature Two. Using calc for "inherit" and other values. Example:

.bunk {
  width: calc(inherit + 10px);
}


Feature Three. Using "style()" value. You can use only ID selectors (like "element(#selector)" of image value). Example:

.bunk {
  width: calc(style(#selector, width) + 10px); //Work like computedStyle
  width: style(#selector, width) == auto ? 100px : 200px;
  width: dstyle(#selector, width) == auto ? 100px : 200px; //Work when animation, because this is default view.
}


Feature Four. Ternary operations in handy. Example is none.
Feature Five. Generalization of values. Similar to try and catch out of JS. Example:

.bunk {
  background-image: [custom1() || custom2()], url(test.png);
}

Feature Six. Custom blank content. Gif image is not needed. Examples:

.bunk {
  //content: blank(150px, 150px); //Empty, like "url(blank150x150.gif)".
  content: blank(150px, 150px, true); //The same, but enable native content (content of img, canvas or video are fits).
  content: blank(150px, 150px, true, true); //The same, but also save some native features, for example video controls.
}

.video {
  content: element(#canvas, true); //Save video controls or other native features.
  content: url("puk.png", true); //Same effect.
}


Feature Seven. Apply filter effects for content only. Effective for graphic content. Example:

.grayscale {
  content-filter: grayscale(100%);
}


END!



All these ideas are aimed at reducing the use of JS and increased priority CSS. However, it will not make the super-flexible application where sometimes without JS is indispensable. But the JS will not hurt the important parts of life CSS. Sorry for the many mistakes, I use a translator and not really speak English.