Skip to content
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

CSS FIX: card-board in sidebar #233

Open
octoshrimpy opened this issue Jun 29, 2024 · 0 comments
Open

CSS FIX: card-board in sidebar #233

octoshrimpy opened this issue Jun 29, 2024 · 0 comments

Comments

@octoshrimpy
Copy link

This block of css auto-detects card-board in the right sidebar and cleans up styling so it's usable. The modal popup is also handled, as it is being inserted within the card-board tab root instead of body root. (should probably fix that)

image

 /* cleaner header  */
.mod-right-split .card-board-view {
        
    .workspace-tab-header-inner-title {
        display: initial;
    }

    .workspace-tab-header-container {
        flex-direction: row-reverse;
    }
    .workspace-tab-header-container-inner {
        flex: 1;
    }

    .card-board-tab-header-spacer {
        display: none;
    }

    /* proper scrolling */
    .card-board-container {
        height: inherit;

        > div { height: 100%; }
        
        > div > div {
            height: 100%;
            display: flex;
            flex-direction:column;

            .card-board-boards.card-board-column-container {
                flex: 1;
                padding-bottom: 2rem;

                .card-board-board {
                    width: 100%;
                }

                .card-board-columns {
                    flex-direction: column;
                }
                
                /* collapsed margins */
                .card-board-column {
                    width: 100%;
                    transition: color 0.25s ease;

                    &.collapsed {
                        padding: 0.6em 1em 0em 1em;
                        color: var(--text-faint);
                        
                        .card-board-column-header {                        
                            writing-mode: inherit;
                        }
                    }

                    /* better arrows */
                    .arrow-down, .arrow-right {
                        margin: -0.3em 0.3em -0.3em -0.9em;
                        border: none;
                        height: 2.5rem;
                        width: 2rem;
                        display: flex;
                        color: white;
                        align-items: center;
                        justify-content: center;
                        position: relative;
                        
                        &:after {
                            content: "›";
                            position: absolute;
                            transform: rotate(0deg);
                            transition: transform 0.25s ease;
                        }

                        &.arrow-right:after {
                            transform: rotate(90deg);
                        }
                    }
                }
            }
        }
    }
}

/* allow modal to pop out of sidebar */
.workspace-leaf.mod-active:has(.card-board-view .modal-container) {
    contain: initial !important;

    .modal-container {
        position: fixed;
        z-index:    50;
    }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant