Ngx-scanner: Remove `cssClass` attribute

Created on 5 Apr 2018  路  5Comments  路  Source: zxing-js/ngx-scanner

As said in: https://github.com/zxing-js/ngx-scanner/issues/55#issuecomment-378918988
...And confirmed in: https://github.com/zxing-js/ngx-scanner/issues/55#issuecomment-379035505

The attribute will be removed from zxing-scanner component.

We have to add docs to explain how to style the inner elements without the class and with ::ng-deep virtual shadow piercing.

P3 enhancement

Most helpful comment

@csutorasr thanks for the example, looks very clean in deed.
I'd suggest to go with this solution, I think we're making our life harder by introducing more Inputs.
If somebody doesn't understand how to properly use that syntax he can still (for now) use the hacky /deep/ workaround but I don't like the idea of more complexity with Inputs just b/c some people might not understand it

All 5 comments

Please DO NOT do that. ::ng-deep is deprecated.

Use max-width attribute instead or something like that.

Please, do not forget you are using Angular built of components. (This is not the first issue where this is forgotten.)

It is deprecated because you shouldn't be able to do anything to the elements inside a component that's not yours.

::ng-deep is the recomended solution in emulated shadow DOM, but you shouldn't be able to change anything inside the component anyway.

I would like to hear more about your ngTemplate idea. The attribute will be removed anyway, it's a trouble generator.

Yes it must be removed. I posted some parts at the wrong issue (#55). I add a stackblitz to the other issue.

@csutorasr thanks for the example, looks very clean in deed.
I'd suggest to go with this solution, I think we're making our life harder by introducing more Inputs.
If somebody doesn't understand how to properly use that syntax he can still (for now) use the hacky /deep/ workaround but I don't like the idea of more complexity with Inputs just b/c some people might not understand it

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ngeor picture ngeor  路  4Comments

JKing-B16 picture JKing-B16  路  6Comments

werthdavid picture werthdavid  路  4Comments

werthdavid picture werthdavid  路  4Comments

mhosman picture mhosman  路  4Comments