FLUID-4219: Without !importants in FSS, some parts of themes in UIO (ex. bg colour) don't apply

Metadata

Source
FLUID-4219
Type
Task
Priority
Blocker
Status
Closed
Resolution
Fixed
Assignee
Michelle D'Souza
Reporter
heidi valles
Created
2011-05-11T11:23:51.607-0400
Updated
2013-04-15T15:27:00.834-0400
Versions
N/A
Fixed Versions
  1. 1.4
Component
  1. FSS
  2. UI Options

Description

We talked about automatically adding !importants into UIO's theme stylesheets

Comments

  • Justin Obara commented 2011-05-17T10:06:57.850-0400

    Bug Parade Infusion

  • Michelle D'Souza commented 2011-07-04T17:00:44.901-0400

    Work is started in branch: https://github.com/michelled/infusion/commits/FLUID-4219

  • Michelle D'Souza commented 2011-07-04T17:04:20.632-0400

    Here is the list of tasks remaining for this work:

    1. Determine the list of declarations that require important.
    2. Implement the code to read, parse, prioritize and serialize the style sheet.
    3. Parameterize read/write.
    4. Create unit tests that can be run in the browser.
    5. Figure out how to link the parser in Ant.
    6. Implement in build.js

  • Colin Clark commented 2011-07-05T13:45:03.303-0400

    Work is continuing in my branch now: https://github.com/colinbdclark/infusion/tree/FLUID-4219

  • Colin Clark commented 2011-07-05T13:48:13.685-0400

    Based on conversations with Heidi (here: http://old.nabble.com/UI-Options-and-!important-to31992616.html and here: http://wiki.fluidproject.org/display/fluid/fluid-work+IRC+Logs-2011-07-05), we've decided to be fairly heavy handed in adding !important to the UI Options versions of the stylesheets. This prioritySpec, used with the CSSGenerator, should do the trick:

    generator.prioritize({
    "fluid-cssGenerator-allRules": ["font-size", "line-height", "font-family", "color", "background-color", "background-image", "border", "background"]
    });

  • Mike Lam commented 2011-07-12T14:17:00.949-0400

    Work is continuing on my branch now: https://github.com/mlam/infusion/tree/FLUID-4219

    The solution is almost there, however, there's a nagging bug that I have yet to figure out. The that.stylesheet object in the CSSGenerator.js file has a value, however the that.stylesheet.cssText seems to be null.

    Here's what's left:

    1. Squash the bug above as described.
    2. List the stylesheets that need to be transformed in the build.properties file and load them (currently hardcoded for testing)
    3. Uncomment the code in StylesheetImportant.js to generate the transformed stylesheet and write it to a file
    4. Determine the path of where to save the transformed stylesheets (for testing, the files are currently set to overwrite itself)

  • Colin Clark commented 2011-07-22T12:38:40.730-0400

    Justin and I have refactored this work a bit and fully integrated it into our ant build system:

    https://github.com/fluid-project/infusion/pull/112

  • Michelle D'Souza commented 2011-07-26T18:25:14.192-0400

    Pull request merged into project repo at 6695d855c1156f60d8bf4ae62ccf3ff26c39a295

  • Michelle D'Souza commented 2011-07-27T12:49:18.290-0400

    A couple tests need to be updated with the new theme names in UIEnhancer and UIOptions.