<commit_before>/* This is for common styling on pages. It is not for UI */

//NB: why wouldn't you *always* want this? If you're doing something fancy,
//and placing editables around(like basic book: basic text & picture does),
//you may have already dealt with spacing.
//.SeparateMultilingualEditables(@doSeparate) when (@doSeparate) {
@StandardMultilingualEditBoxSeparation: 10px; //Beware the temptation to express this in "em"s. As the user changes the font size, that could make stuff exceed the bounds of the page

.Common-SeparateMultilingualEditables(@separation) {
    // .bloom-translationGroup {
    //     .bloom-editable {
    //         &.bloom-content2, &.bloom-content3 {
    //             margin-top: @separation;
    //         }
    //     }
    // }

    // See BL-4515. The task is to separate multilingual fields without putting a margin above the first one.
    // The previous approach (commented out, above) relied on content2 and content3 never being the first, but
    // as of 3.8, they can be. Note that this sibling operator relies on the physical order of the multlingual alternatives.
    // I didn't actually expect it to work, since we use flex order to control order. But something in Bloom is reording
    // the underlying html, so it does work.
    // Note that in the near future we want to more clearly separate out the three axes: order, visibility, and
    // role (Vern, National, etc). When we do that, we may have a different way to do this that we like more.
    .bloom-editable.bloom-visibility-code-on ~ .bloom-editable,
    .bloom-editable.bloom-visibility-user-on ~ .bloom-editable {
        margin-top: @separation;
    }
}

@defaultLineHeight: 1.5em; //no units! No em!!!! em makes children inside have a lineheight that matches the font of the overall box, regardless of the thing's font-size. See https://developer.mozilla.org/en-US/docs/Web/CSS/line-height

// N.B. New formats must also work something out in pageThumbnailList.less.
@Device16x9Portrait-Width: 100mm;
@Device16x9Portrait-Height: @Device16x9Portrait-Width * 16 / 9;
@Device16x9Landscape-Height: @Device16x9Portrait-Width;
@Device16x9Landscape-Width: @Device16x9Portrait-Height;
@DeviceMargin: 10px;
@DeviceBottomMargin: 45px; // leave room for page number

@PictureStoryLandscape-Height: @Device16x9Landscape-Height;
@PictureStoryLandscape-Width: @Device16x9Landscape-Width;

@A4Portrait-Height: 297mm;
@A4Portrait-Width: 210mm;
@A4Landscape-Height: @A4Portrait-Width;
@A4Landscape-Width: @A4Portrait-Height;

@A3Portrait-Height: @A4Portrait-Width * 2;
@A3Portrait-Width: @A4Portrait-Height;
@A3Landscape-Height: @A3Portrait-Width;
@A3Landscape-Width: @A3Portrait-Height;

@A5Portrait-Height: @A4Portrait-Width;
@A5Portrait-Width: floor(@A4Portrait-Height / 2);
@A5Landscape-Height: @A5Portrait-Width;
@A5Landscape-Width: @A5Portrait-Height;

@A6Portrait-Height: @A5Portrait-Width;
@A6Portrait-Width: floor(@A4Portrait-Width / 2);
@A6Landscape-Height: @A6Portrait-Width;
@A6Landscape-Width: @A6Portrait-Height;

@B5Portrait-Height: 250mm;
@B5Portrait-Width: 176mm;

@LetterPortrait-Height: 11in;
@LetterPortrait-Width: 8.5in;
@LetterLandscape-Height: @LetterPortrait-Width;
@LetterLandscape-Width: @LetterPortrait-Height;<commit_msg>WIP fix each page getting pushed down by 1/2 pixel in FB-enabled pages<commit_after>/* This is for common styling on pages. It is not for UI */

//NB: why wouldn't you *always* want this? If you're doing something fancy,
//and placing editables around(like basic book: basic text & picture does),
//you may have already dealt with spacing.
//.SeparateMultilingualEditables(@doSeparate) when (@doSeparate) {
@StandardMultilingualEditBoxSeparation: 10px; //Beware the temptation to express this in "em"s. As the user changes the font size, that could make stuff exceed the bounds of the page

.Common-SeparateMultilingualEditables(@separation) {
    // .bloom-translationGroup {
    //     .bloom-editable {
    //         &.bloom-content2, &.bloom-content3 {
    //             margin-top: @separation;
    //         }
    //     }
    // }

    // See BL-4515. The task is to separate multilingual fields without putting a margin above the first one.
    // The previous approach (commented out, above) relied on content2 and content3 never being the first, but
    // as of 3.8, they can be. Note that this sibling operator relies on the physical order of the multlingual alternatives.
    // I didn't actually expect it to work, since we use flex order to control order. But something in Bloom is reording
    // the underlying html, so it does work.
    // Note that in the near future we want to more clearly separate out the three axes: order, visibility, and
    // role (Vern, National, etc). When we do that, we may have a different way to do this that we like more.
    .bloom-editable.bloom-visibility-code-on ~ .bloom-editable,
    .bloom-editable.bloom-visibility-user-on ~ .bloom-editable {
        margin-top: @separation;
    }
}

@defaultLineHeight: 1.5em; //no units! No em!!!! em makes children inside have a lineheight that matches the font of the overall box, regardless of the thing's font-size. See https://developer.mozilla.org/en-US/docs/Web/CSS/line-height

// N.B. New formats must also work something out in pageThumbnailList.less.
@Device16x9Portrait-Width: 100mm;
@Device16x9Portrait-Height: @Device16x9Portrait-Width * 16 / 9;
@Device16x9Landscape-Height: @Device16x9Portrait-Width;
@Device16x9Landscape-Width: @Device16x9Portrait-Height;
@DeviceMargin: 10px;
@DeviceBottomMargin: 45px; // leave room for page number

@PictureStoryLandscape-Height: @Device16x9Landscape-Height;
@PictureStoryLandscape-Width: @Device16x9Landscape-Width;

// We seem to have a 1/2 pixel overflow that gradually shifts each page down when we make PDF
@OverflowPreventFudge: 0.1;
@A4Portrait-Height: 297mm;
@A4Portrait-Width: 210mm - @OverflowPreventFudge;
@A4Landscape-Height: @A4Portrait-Width;
@A4Landscape-Width: @A4Portrait-Height;

@A3Portrait-Height: @A4Portrait-Width * 2;
@A3Portrait-Width: @A4Portrait-Height;
@A3Landscape-Height: @A3Portrait-Width;
@A3Landscape-Width: @A3Portrait-Height;

@A5Portrait-Height: @A4Portrait-Width;
@A5Portrait-Width: floor(@A4Portrait-Height / 2);
@A5Landscape-Height: @A5Portrait-Width;
@A5Landscape-Width: @A5Portrait-Height;

@A6Portrait-Height: @A5Portrait-Width;
@A6Portrait-Width: floor(@A4Portrait-Width / 2);
@A6Landscape-Height: @A6Portrait-Width;
@A6Landscape-Width: @A6Portrait-Height;

@B5Portrait-Height: 250mm;
@B5Portrait-Width: 176mm;

@LetterPortrait-Height: 11in;
@LetterPortrait-Width: 8.5in;
@LetterLandscape-Height: @LetterPortrait-Width;
@LetterLandscape-Width: @LetterPortrait-Height;
{'fraction_non_alphanumeric': 0.108265078183172, 'fraction_numerical': 0.03127326880119136, 'mean_word_length': 4.138485080336649, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, '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': '4462', 'n_tokens_mistral': 2325, 'n_tokens_neox': 2165, 'n_words': 660}