GithubHelp home page GithubHelp logo

Comments (5)

vnbaaij avatar vnbaaij commented on June 6, 2024 1

For the next release the .body class has been added. Totally up to you if you want to use it, of course. I think it is handy to have that nevertheless.

Closing this one as a workaround is available

from fluentui-blazor.

verdie-g avatar verdie-g commented on June 6, 2024

Ah might be fixed by FixedPlacement #1879 ?

Fixed placement allows the region to break out of parent containers.

from fluentui-blazor.

vnbaaij avatar vnbaaij commented on June 6, 2024

No, FixedPlacement won't help for this. I tried some stuff. Ended up with:

image

Added this

<style>
    .reset {
        all: revert;
    }
</style>

And did this:

<FluentPopover Class="reset" Style="width: 300px; " AnchorId="trace-metadata" @bind-Open="_visible" FixedPlacement="true">
    <Header><FluentLabel Typo="Typography.H3">My Header</FluentLabel></Header>
    <Body>
        <div class="body">
        <ul>
            <li>Bla</li>
            <li>Bla</li>
            <li>Bla</li>
            <li>Bla</li>
        </ul>
        </div>
    </Body>
</FluentPopover>

The class body on th Body element does not exist yet. I created it by changing the reboot.css so that .body is added to the body declaration. I can make that chnge permanenet for the next release. For now you would need to add to your style

.body {
    margin: 0;
    font-family: var(--body-font);
    font-size: var(--type-ramp-base-font-size);
    line-height: var(--type-ramp-base-line-height);
    font-weight: var(--font-weight);
    color: var(--neutral-foreground-rest);
    background-color: var(--neutral-fill-layer-rest);
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

Is adding the .body interesting, you think?

from fluentui-blazor.

verdie-g avatar verdie-g commented on June 6, 2024

That looks hacky to me. I think the standard solution is to append the Popover to the <body>. For example, that's what MudBlazor did with their Popover. They have a popover-provider as a child of the body for all the popovers of the page.

image

from fluentui-blazor.

vnbaaij avatar vnbaaij commented on June 6, 2024

Yeah, that is just not how our Popover works now. I wouldn't call it a standard, but we do this for other components as well (dialog, messagebar, ...). Might make for an alternative approach in the future.

from fluentui-blazor.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.