@import "../../base/fn";

.njui-grids {
    position: relative;
    overflow: hidden;

    &:before {
        .setTopLine(@njuiGridBorderColor);
    }
    &:after {
        .setLeftLine(@njuiGridBorderColor);
    }
}

.njui-grid {
    position: relative;
    float: left;
    padding: 20px 10px;
    width: 100% / @njuiGridColumnCount;
    box-sizing: border-box;

    &:before {
        .setRightLine(@njuiGridBorderColor);
    }
    &:after {
        .setBottomLine(@njuiGridBorderColor);
    }

    &:active {
        background-color: @njuiBgColorActive;
    }
}

.njui-grid__icon {
    width: @njuiGridIconSize;
    height: @njuiGridIconSize;
    margin: 0 auto;

    img {
        display: block;
        width: 100%;
        height: 100%;
    }

    & + .njui-grid__label {
        margin-top: 5px;
    }
}

.njui-grid__label {
    display: block;
    text-align: center;
    color: @njuiTextColorTitle;
    font-size: @njuiGridFontSize;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}
