Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Customized "background-color" property definition for .htdimm style not works #965

Closed
xinfli opened this issue Aug 12, 2013 · 4 comments
Closed

Comments

@xinfli
Copy link

xinfli commented Aug 12, 2013

We use a customized .htdimm style with a new "background-color" property added to set background color for read only cells; after updated to 0.9.12, the property not works.

Refer to http://jsfiddle.net/TF6Bu/ (0.9.9) and http://jsfiddle.net/j4cFf/ (0.9.12), the 3rd and 4th cells were set to read only, but the background color setting only works for 0.9.9.

@psmolenski
Copy link
Contributor

http://jsfiddle.net/j4cFf/ fiddle has no chance to work, mainly because there is no code responsible for marking 3rd and 4th cells as read only, and custom style for .htDimmed class is not defined 😉 . I assume that you pasted link to wrong fiddle, as http://jsfiddle.net/TF6Bu/ fiddle has those elements.

Nevertheless, the reason why rule

.handsontable .htDimmed {
    background-color: #F2F2F2;
    font-style: italic;
}

stopped working is because in 0.9.12 we have used more specific selectors for styling cells, to avoid interfering with other page components you may use (i.e. jQuery UI). You have to update your selectors like so:

.handsontable .htCore .htDimmed {
    background-color: #F2F2F2;
    font-style: italic;
}

I have modified your jsFiddle: http://jsfiddle.net/j4cFf/2/

@xinfli
Copy link
Author

xinfli commented Aug 13, 2013

Thanks, after change ".handsontable .htDimmed" to ".handsontable .htCore .htDimmed", it works.

But I synced the newest code in 0.9.12, the .htDimmed style is still defined as ".handsontable .htDimmed", it should be changed to ".handsontable .htCore .htDimmed", isn't it?

@psmolenski
Copy link
Contributor

Good point. I'll take care of it.

warpech added a commit that referenced this issue Aug 15, 2013
… and #956)

jQuery UI Datepicker moved outside of ".handsontable" to retain compability with fixes for #498
@warpech
Copy link
Member

warpech commented Aug 15, 2013

In HOT 0.9.13 I removed the requirement to use .handsontable .htCore .htDimmed

Previous notation .handsontable .htDimmed will work again (though you don't have to revert)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants