Commit 8c222bd5 authored by Yoshinori Okuji's avatar Yoshinori Okuji

2010-02-01 yo

* Switch to class-based completely instead of id-based styling in erp5.css. The old way is kept for backward compatibility.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@32138 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 4f5f97fb
2010-02-01 yo
* Switch to class-based completely instead of id-based styling in erp5.css. The old way is kept for backward compatibility.
2010-2-1 Yusei 2010-2-1 Yusei
* Update erp5.css and set hidden_fieldset.border 0. * Update erp5.css and set hidden_fieldset.border 0.
......
879 880
\ No newline at end of file \ No newline at end of file
  • @romain What do you think of this ? Shall I continue in this direction and for example do:

    --- a/bt5/erp5_code_mirror/SkinTemplateItem/portal_skins/erp5_code_mirror/code_mirror_support.txt
    +++ b/bt5/erp5_code_mirror/SkinTemplateItem/portal_skins/erp5_code_mirror/code_mirror_support.txt
    @@ -248,7 +248,7 @@
        function successHandler(data) {
          generateHistorySelectElement();
     
    -     transition_message = $('#transition_message');
    +     transition_message = $('.transition_message');
          transition_message.css('opacity', 0.0);
          transition_message.html(data);
          transition_message.animate({opacity: 1.0},
    diff --git a/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web_minimal_theme/erp5_web.css.zpt b/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web_minimal_theme/erp5_web.css.zpt
    index 2b58292cee..1b92458691 100644
    --- a/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web_minimal_theme/erp5_web.css.zpt
    +++ b/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web_minimal_theme/erp5_web.css.zpt
    @@ -134,7 +134,7 @@ body, input, textarea, select, table {
     
     .code, code {font-family: monospace}
     
    -#transition_message, .warning, .error, .important {
    +.transition_message, .warning, .error, .important {
       color: #f00;
       font-weight: bold;
     }
    diff --git a/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_fckeditor/erp5_editor.css.css b/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_fckeditor/erp5_editor.css.css
    index 9cd54dc64e..7b2e78236d 100644
    --- a/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_fckeditor/erp5_editor.css.css
    +++ b/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_fckeditor/erp5_editor.css.css
    @@ -524,7 +524,7 @@ fieldset.bottom .field .input {
     /*   font-size: 90%; */
     }
     
    -#transition_message {
    +.transition_message {
       margin-left: 1em;
       color: #f00;
       background-color: inherit;
  • I would not switch it to a class selector, because we could break some custom CSS used by projects (on web site for example)

  • Initially, I was about to only add:

    .transition_message.transition_message_debug,
    .transition_message.transition_message_info {
      color: inherit;
    }
    .transition_message.transition_message_success {
      color: green;
    }
    .transition_message.transition_message_error,
    .transition_message.transition_message_fatal {
      color: red;
    }

    But that only works if I do:

    @@ -794,7 +794,6 @@ body[dir="rtl"] .logged_in_as {
     /*   font-size: 90%; */
     }
     
    -#transition_message, /* BBB */
     .transition_message {
       margin-left: 1em;
       color: #f40;

    Sorry frankly, I don't care about projects. I would if we had a policy to clean up deprecated stuff and if we applied it. Otherwise, that's a dead-end. 12 years. I'm tired of mess and I want to clean up this part.

    So what's the clean way ignoring backward compatibility ?

  • id has an higher specificity

    I suppose you could also do:

    #transition_message.transition_message_debug,
    #transition_message.transition_message_info {
      color: inherit;
    }
    #transition_message.transition_message_success {
      color: green;
    }
    #transition_message.transition_message_error,
    #transition_message.transition_message_fatal {
      color: red;
    }
  • I know. But that would conflict with this commit, which states that id-based is deprecated.

  • So, if you want to be consistent with this commit, add both class and id selectors.

    If one day we want to really drop all id selectors, your changes should still work. But I don't see the point working on this, as erp5.css nearly never changes, and as the direction is to switch to erp5js.

  • mentioned in commit 0c2dd107

    Toggle commit list
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment