-
Notifications
You must be signed in to change notification settings - Fork 251
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
Getting real card parameters and using them in Javascript Templates #860
Comments
you seem to be looking for relative sizing options, which are part of available css options. why don't you try getting acquainted with the css and button-card options first. Please don't create FR's for anything you dont yet really understand. Please close this FR, there is no need for it |
@Mariusthvdb, first of all, I would like to say that I have great respect for all developers, as well as those people who help ordinary users here in solving their problems... Accordingly, I do not want to create any additional problems by my actions in any way. |
Hello.
In the case when some card parameters are set as a percentage (for example, the width or height of the card), the actual parameters will vary depending on the device parameters (in particular, the display resolution) and the browser used.
For example, there may be a situation in which the card will have a larger width (in pixels) on one device, and a smaller one on the other. But the width of a text box containing, for example, the name of an entity will be the same in both cases.
Let's say the width of this text box is less than the width of the card on the first device, but it is larger than the width of the card on the second device.
Respectively, on the first device the entity name will be displayed in full, but not on the second.
I would like to be able (in the case described above) to get the real width of the card on the device and the real width of the text box containing the name of the entity, be able to compare them, and also use the comparison result in Javascript Templates.
For example, for the second case, it would be possible to assign word wrapping to a new line, reduce the font size, or arrange automatic horizontal scrolling of the text. But the most important thing is that all these additional activities should only take place when the width of the text box is larger than the width of the card. That is, for example, I do not need automatic horizontal scrolling of the text or font size reduction in the event that it already fits completely on the card.
To organize what I described above, I apparently need to get the real width values inside Javascript Templates.
More generally, access to more card parameters (as well as its composite and nested elements) inside Javascript Templates is desirable.
Is there even such a possibility? Or maybe it can be provided in future versions?
The text was updated successfully, but these errors were encountered: