Skip to content

Copying a device model should not copy the CSS Model Identifier #267

Description

@pdc1

[Edit: updated to reflect the underlying issue, namely that if copying a device model also copies the CSS Model Identifier, then ALL CSS values are hard-coded in the plugin.css and not read from the device model definition, which is very confusing and defeats the point of making a copy.]

I have a dashboard I set up for my Kindle PW4 (10th gen) using device Amazon Kindle PW 7th Gen. It has some issues, but works well enough.

I then added a Kindle Oasis, using Amazon Kindle Oasis 2, and found all the fonts and scaling to be too large. That is, it's a larger screen, but the fonts are zoomed in even more.

So I copied the device model and made my own. However, nothing I did actually changed the rendering!

When I investigated, I found that the plugins.css hard codes the size/etc values based on the CSS Model Identifier, and that is copied when you copy the device model.

Ultimately that was my issue. When I changed it to something not defined (like kindle-oasis-copy) my rendering looks good (aside from some responsive layout issues).

Here's an example of Kindle PW4 (Note: this is a hacked version of the core plugin!)
Image

And here's the default Kindle Oasis:
Image

My first thought was it's an issue with CSS definitions, so I tried creating a copy of Kindle Oasis and changing CSS values, but that had no effect at all!

Once I changed the CSS Model Identifier it looks a lot better! (see next post).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions