Skip to content

Custom theme breaks with @ory/elements-react v1.1 #575

Description

@vilasp

Preflight checklist

Ory Network Project

No response

Describe the bug

Hey!

We have a custom UI set up with Ory and we have been following the setup in the docs. All have worked well (with minor changes since we had this setup before v1.0 was released) but now with v1.1 (which we need) our styling breaks.
Looking at the release notes this commit seems to be the offender and it looks like the docs have not been updated to match.

If I replace :root with .ory-elements in our SASS setup and also add the ory-element class to our Card root override component we get most of our styling back but there seem to be cases where Ory styling cannot be overridden since Ory:s CSS has higher specificity. As an example I attached our own header component with after and before the update and you can see the issue.

Before After
Image Image

Reproducing the bug

Not tested

Relevant log output

Relevant configuration

Version

1.1

On which operating system are you observing this issue?

macOS

In which environment are you deploying?

Other

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions