<commit_before>// Copyright (C) 2014 Orbeon, Inc.
//
// This program is free software; you can redistribute it and/or modify it under the terms of the
// GNU Lesser General Public License as published by the Free Software Foundation; either version
// 2.1 of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
// without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU Lesser General Public License for more details.
//
// The full text of the license is available at http://www.gnu.org/copyleft/lesser.html

@import (reference)  "../../../apps/fr/style/form-runner-common";

.orbeon {
    .xbl-fr-grid {

        .fr-table {
          max-width: 100%;
          background-color: @tableBackground;
          border-collapse: collapse;
          border-spacing: 0;
        }

        margin-bottom: 10px;            // So we have some space between us and the next grid or nested section

        // Minimal appearance buttons
        &.xforms-grid-appearance-minimal .fr-grid-bottom-buttons {

            display: block;
            margin-top: 10px;

            .xforms-trigger {
                margin-right: 1em;
            }
        }

        .fr-grid { // this is the <div> or <table> element, so everything within the grid proper

            display: table;
            table-layout: fixed;
            width: 100%;

            .fr-grid-head {
                display: table-header-group;
            }

            .fr-grid-body {
                display: table-row-group;
            }

            .fr-grid-tr {
                display: table-row;

                // Padding/margin in the cell content: see https://github.com/orbeon/orbeon-forms/issues/2414
                &> .fr-grid-td {
                    display: table-cell;
                    vertical-align: top;
                    padding: 0 @frGridCellPadding;

                    &> .xforms-control, &> .xbl-component, &> .xforms-group {
                        margin: @frGridCellPadding 0;
                        display: block;
                    }
                }
            }

            .fr-grid-master-row {
                display: table-row;

                &> .fr-grid-th {
                    display: table-cell;
                    text-align: left;

                    .xforms-output {
                        // We want the block for the label in the header to "go around" its content, so the help
                        // popover is correctly positioned.
                        display: block;
                    }

                    // If there is a group with a label in a grid th, remove the border added by Bootstrap
                    legend.xforms-label {
                        border-bottom: none;
                        margin: 0;
                    }
                }
            }

            .fr-grid-body .fr-grid-tr > .fr-grid-th {
                vertical-align: top;
                width: auto;
                // Removed as this looks like a hack and combined with the position: relative in FB, which we need for the
                // absolute positioning of the cell editors, this crops overlays, in particular the date picker
                // overflow: hidden
            }

            // In non-repeated grids, make rows except the last one take the minimum possible amount of vertical space in
            // case `rowspan`s are used. This is usually the intended layout, as opposed to rows taking proportionally more
            // or less vertical space.
            // NOTE: This should be extended to repeated grids as well, but they interleave `<tr>`s which makes it harder.
            &:not(.fr-repeat) {
                .fr-grid-body .fr-grid-tr {
                    height: 0;
                }
                .fr-grid-body tr:last-of-type {
                    height: auto;<commit_msg>Fix #3283 "FB: Grid with rowspan="1" doesn't take height"<commit_after>// Copyright (C) 2014 Orbeon, Inc.
//
// This program is free software; you can redistribute it and/or modify it under the terms of the
// GNU Lesser General Public License as published by the Free Software Foundation; either version
// 2.1 of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
// without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU Lesser General Public License for more details.
//
// The full text of the license is available at http://www.gnu.org/copyleft/lesser.html

@import (reference)  "../../../apps/fr/style/form-runner-common";

.orbeon {
    .xbl-fr-grid {

        .fr-table {
          max-width: 100%;
          background-color: @tableBackground;
          border-collapse: collapse;
          border-spacing: 0;
        }

        margin-bottom: 10px;            // So we have some space between us and the next grid or nested section

        // Minimal appearance buttons
        &.xforms-grid-appearance-minimal .fr-grid-bottom-buttons {

            display: block;
            margin-top: 10px;

            .xforms-trigger {
                margin-right: 1em;
            }
        }

        .fr-grid { // this is the <div> or <table> element, so everything within the grid proper

            display: table;
            table-layout: fixed;
            width: 100%;

            .fr-grid-head {
                display: table-header-group;
            }

            .fr-grid-body {
                display: table-row-group;
            }

            .fr-grid-tr {
                display: table-row;

                // Padding/margin in the cell content: see https://github.com/orbeon/orbeon-forms/issues/2414
                &> .fr-grid-td {
                    display: table-cell;
                    vertical-align: top;
                    padding: 0 @frGridCellPadding;

                    &> .xforms-control, &> .xbl-component, &> .xforms-group {
                        margin: @frGridCellPadding 0;
                        display: block;
                    }
                }
            }

            .fr-grid-master-row {
                display: table-row;

                &> .fr-grid-th {
                    display: table-cell;
                    text-align: left;

                    .xforms-output {
                        // We want the block for the label in the header to "go around" its content, so the help
                        // popover is correctly positioned.
                        display: block;
                    }

                    // If there is a group with a label in a grid th, remove the border added by Bootstrap
                    legend.xforms-label {
                        border-bottom: none;
                        margin: 0;
                    }
                }
            }

            .fr-grid-body .fr-grid-tr > .fr-grid-th {
                vertical-align: top;
                width: auto;
                // Removed as this looks like a hack and combined with the position: relative in FB, which we need for the
                // absolute positioning of the cell editors, this crops overlays, in particular the date picker
                // overflow: hidden
            }

            // In non-repeated grids, make rows except the last one take the minimum possible amount of vertical space in
            // case `rowspan`s are used. This is usually the intended layout, as opposed to rows taking proportionally more
            // or less vertical space.
            // NOTE: This should be extended to repeated grids as well, but they interleave `<tr>`s which makes it harder.
            &:not(.fr-repeat):not(.fr-editable) { // see also https://github.com/orbeon/orbeon-forms/issues/3283
                .fr-grid-body .fr-grid-tr {
                    height: 0;
                }
                .fr-grid-body tr:last-of-type {
                    height: auto;
{'fraction_non_alphanumeric': 0.08714973460066658, 'fraction_numerical': 0.007529934575978274, 'mean_word_length': 1.3248206599713055, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 21, 'https://': 3, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6957785', 'n_tokens_mistral': 2141, 'n_tokens_neox': 1953, 'n_words': 722}