capacitor-community / barcode-scanner

A fast and efficient (QR) barcode scanner for Capacitor
MIT License
437 stars 172 forks source link

Add css class to HTML element #141

Closed heinerlamprecht closed 1 year ago

heinerlamprecht commented 2 years ago

Would it be possible to add a certain css class to the HTML element instead (or in addition) to the style attribute? This would easily allow to style certain UI elements in the application when scanning is active.

thegnuu commented 2 years ago

Technically this would not be a problem, but I think this is something that should be handled individually by each developer since it is really easy to implement and some might want different classes or add those classes to different elements aso...

thegnuu commented 1 year ago

I will close this and rewrite the docs to help with this issue :)

CD-UNCC commented 1 year ago

@thegnuu did this ever happen? (updating the docs on how to style this component) in response to your reply, an id or single class would be a huge help just for targeting, then developers could style this thing much easier and add remove classes easier. We cant just target the last div in the body to accurately get the camera as other things may be getting attached to the body.

I was surprised when using this library that instead of the common problem is getting the camera to show up I was greeted with a massive black box that overtook the entire application with no easy way to style

image

(this is an app with lots of UI above and ionic tab navigation below the camera)