Open indignant opened 3 years ago
@indignant Thanks for reporting this issue! I will reach out to our widget team for suggestions.
@indignant Can you try this guide. Here is also a live widget that you can play with.
Thank you for looking into this @shuowu
I should have mentioned that I had read the guide you linked to and am able to update the CSS for the page/widget if I use the IDs/classes/elements I find in the browser's inspector. However the README in this project says that this is not encouraged since "the classes/elements are subject to change between releases."
So I guess my question boils down to:
It seems like both the live widget editor and this video use the classes to edit things. Is the README wrong maybe? Or is there no way to have stable styles that work between releases?
@indignant For styling Okta hosted widget, you can follow this guide
@shuowu Yep, I saw that (I actually linked to the same article in this comment). I'm having trouble explaining myself.
Resources on the Okta website suggest styling the widget using IDs/classes/elements, but the README in this repo explicitly says to avoid this:
│ │ # Main CSS file for widget styles. Try not to override the classes in this
│ │ # file when creating a custom theme - the classes/elements are subject to
│ │ # change between releases
Those things, as far as I understand them, are mutually exclusive. I can't both use the classes and avoid using the classes. So I suppose there are two options for resolving this issue:
I guess I can stay fixed to specific version of the widget, but I'd be concerned about missing important security updates. Either way, I think it would be beneficial to have a stable styling API that's documented because I'm not sure of all the possible things users might see and I want to create a consistent experience for them.
@indignant Right, we will align the README file with the guide.
Internal Ref: OKTA-443373
I am still confused about the appropriate way to style the widget. Do we need to download the prebaked okta-sign-in.min.css and then provide our own css overwrites? Is there a way to alter the okta css directly so we don't download a bunch of "unused css"? Also, we have our own fonts. How do we use our own internal fonts directly instead of download the "monsterat" fonts that okta comes with? Would like to avoid these unnecessary font downloads if able.
Currently we import the okta-sign-in.min.css then using styled-components we overwrite these styles but need to use '!important' on all of them for them to take affect. Definitely feels like a hack, but haven't been able to figure out any other way.
@shuowu are there instructions on how to properly style the widget if you're using it as an npm module? I'd like to remove the dependencies on the font files at a minimum!
I'm submitting a
Background info
Hey there 🌈 As a frontend dev, I've been tasked with styling an Okta hosted login page. The Okta documentation specifies that we can add styles in Customization tab in Okta then redirects to this repo. The README here has this text:
But I don't see where there's an example of using custom styles. I think it would be beneficial to have an example of customizing the widget without referring to the classes/elements in the markup for the widget.
Expected behavior
As a new Okta user, I would expect some explanation or example on how to do the things the documentation says is possible in a way that is not at odds with the warnings in this repo's README.
Thank you 🦄