For some reason, col-start-n doesn't seem to be working in the production version of my code. If I run it locally, I get the expected result which is 2 cards in 2 different rows, like so:
correct placement
When I run it with yarn serve -mode production, I get them in the same row, with the top of one slightly below the other:
incorrect placement
This is the code snippet where I'm running into an issue. I've even tried directly editing the value for col-start-n directly when inspecting the element, but it doesn't seem to do anything.
<div class="flex-grow flex-col overflow-auto max-h-screen w-full dark:text-gray-300 main-body">
<div class="m-auto pt-4 lg:grid lg:grid-cols-8 space-y-12">
<div class="h-64 max-h-screen lg:col-span-4 lg:col-start-3">...</div>
<div class="h-64 max-h-screen lg:col-span-4 lg:col-start-3">...</div>
</div>
</div>
And here's my tailwind configuration:
module.exports = {
purge: ['./index.html', './src/**/*.{vue,js,ts,jsx,tsx}'],
darkMode: 'class', // or 'media' or 'class'
theme: {
extend: {
fontFamily: {
nunito: ['nunito', 'sans'],
cinzel: ['cinzel', 'sans-serif'],
lora: ['lora', 'sans-serif']
},
listStyleType: {
square: 'square'
},
boxShadow: {
'sm-white': '0 1px 2px 0 rgba(255, 255, 255, 0.05)',
white: '0 1px 3px 0 rgba(255, 255, 255, 0.1), 0 1px 2px 0 rgba(255, 255, 255, 0.06)',
'md-white': '0 4px 6px -1px rgba(255, 255, 255, 0.1), 0 2px 4px -1px rgba(255, 255, 255, 0.06)',
'lg-white': '0 10px 15px -3px rgba(255, 255, 255, 0.1), 0 4px 6px -2px rgba(255, 255, 255, 0.05)',
'xl-white': '0 20px 25px -5px rgba(255, 255, 255, 0.1), 0 10px 10px -5px rgba(255, 255, 255, 0.04)',
'2xl-white': '0 25px 50px -12px rgba(255, 255, 255, 0.25)',
'3xl-white': '0 35px 60px -15px rgba(255, 255, 255, 0.3)',
'inner-white': 'inset 0 2px 4px 0 rgba(255, 255, 255, 0.06)'
}
},
container: {
center: true
}
},
variants: {
extend: {
boxShadow: ['dark']
}
},
plugins: []
}
You can simply use the flex classes only , you don't need to use grid classes then.
<script src="https://cdn.tailwindcss.com"></script>
<div class="flex-grow container mx-auto flex-col justify-center overflow-auto max-h-screen dark:text-gray-300 ">
<div class="m-auto pt-4 space-y-12">
<div class="h-64 max-h-screen bg-slate-200 text-center p-10">Card 1</div>
<div class="h-64 max-h-screen bg-slate-300 text-center p-10">Card2</div>
</div>
</div>
Related
I work on Nuxt.js (Vue.js) application that uses BootstrapVue (Bootstrap based) package.
The current situation is as following:
The code looks as following:
<template lang="pug">
b-container
b-row
b-col(:cols="8")
b-container
b-row
b-list-group
b-list-group-item.flex-column.align-items-start(
v-for="(item, index) in 7" :key="index"
href='#'
)
b-container
b-row
b-col(:cols="1").d-flex.align-items-center.justify-content-center
b-form-checkbox {{ index + 1 }}
b-col(:cols="11")
basket-item(:itemNumber="index + 1" :checkStatus="accepted")
b-row.style-row-middle
b-button.close(type='button' aria-label='Close' #click="onClose()")
span(aria-hidden='true') ×
u Удалить выбранное
b-button(type='button' #click="onContinue()").btn.btn-lg.buy__button Продолжить покупки
b-row
div
hr
| * доставка будет осуществлена из Санкт-Петербурга;
br
| * наш менеджер свяжется с вами сразу после обработки заказа;
b-col(:cols="4" class="col2")
form(ref='form' #submit.stop.prevent='handleSubmit').set-padding
div
strong
label ЗАКАЗ
div
strong
label Всего товаров: 1
div
strong
label На суму: 100 000 р
b-form-group(label='')
b-form-group(label='Телефон' label-for='type-tel' invalid-feedback='Phone is required')
b-form-input(id="type-tel" type="tel" v-model='phone' required)
b-form-group(label='E-mail' label-for='type-email' invalid-feedback='E-mail is required')
b-form-input(id="type-email" type="email" v-model='email' required)
b-form-group(label='Ваше имя' label-for='name-input' invalid-feedback='Name is required' :state='nameState')
b-form-input(:id="name-input" v-model='name' :state='nameState')
div.d-flex.align-items-center.justify-content-center
b-button(type='submit' variant='primary' size="lg") Оформить заказ
</template>
<style lang="sass">
.list-group
margin-bottom: 10px
max-height: 400px
-webkit-overflow-scrolling: touch
overflow-y: auto
.list-group-item
border-style: none
.set-padding
padding-bottom: 7px
padding-top: 7px
.style-row
border: solid 1px black
display: flex
justify-content: space-between
.style-row-middle
display: flex
justify-content: space-between
padding: 4px
.col1
border: 1px solid red
.col2
border: 10px solid rgb(0, 70, 140)
.buy__button
background-color: #eee
background-image: -webkit-linear-gradient(bottom, #ccc 0%, #eee 100%)
border: 1px solid #cccccc
color: black
font-size: 16px
text-shadow: 0.5px 0.866px 0 white
.set-border
border: 1px solid gray
border-radius: 3px
margin-bottom: 2px
margin-top: 2px
</style>
I need to stretch product's rows to maximum, but I'm not sure how to do it.
The screenshot shows padding in .list-group-item that could be reduced to 2px:
.list-group-item
padding: 2px
Also, .list-group should take the full width available in the row:
.list-group
width: 100%
demo
I'm using ImageKit to store images for my portfolio (more specifically, I'm using their Vue SDK. Typically my images are horizontal/landscape, however I just added a few that are vertical orientation. What I'd like to do is force crop the vertical images so that they are the same dimensions as the horizontal images. Does anybody have any experience with this?
<template>
<client-only>
<v-col
cols="12"
sm="6"
md="6"
lg="4"
xl="3">
<v-card
class="image-card"
flat
nuxt
:ripple="false"
:to="imageLink">
<div class="overlay">
<h3
class="display-2 text--white gallery-name">
{{ item.title }}
</h3>
<div class="btn-wrapper">
<v-btn
depressed
:ripple="false"
color="primary"
class="visit-btn"
:to="imageLink">
{{ btnText }}
</v-btn>
</div>
</div>
<i-k-image
:public-key="publicKey"
:url-endpoint="urlEndpoint"
:src="imageSrc"
:transformation="[
{ progressive: true },
{ cropMode: 'maintain_ratio' },
{ width: '500' },
]"
#contextmenu.prevent />
</v-card>
</v-col>
</client-only>
</template>
<style lang="scss" scoped>
.image-card {
border-top-left-radius: 4px;
border-top-right-radius: 4px;
cursor: pointer;
height: 100%;
margin: 0 auto;
position: relative;
.overlay {
align-items: center;
background-color: rgba(255, 255, 255, 0.3);
bottom: 0;
display: flex;
flex-direction: column;
justify-content: center;
left: 0;
opacity: 0;
position: absolute;
right: 0;
top: 0;
transition: 0.2s all ease-in-out;
visibility: hidden;
}
img.ik-image {
width: 100%;
}
}
</style>
Current result:
*I'd like the top row to be force cropped to the same dimensions as the bottom row.
You can use the <ik-image> component of Imagekit Vue SDK to set the same height and width for all of your images like this -
<ik-image :src="your_image_src" :transformation="[{ height: 300, width: 400 }]" /> (assuming you have installed Imagekit plugin using Vue.use and specified required parameters there)
I found this site for Bootstrap pretty scrollbars. I tried to apply it to my div but nothing happened :
<style>
#collapseVehicules {
height:250px !important;
}
</style>
<div class="collapse scrollbar-primary" id="collapseVehicules" style="padding-left: 15px;padding-right: 15px;overflow-y: scroll;">
<table id="list" class="table table-borderless table-striped table-sm" style="margin-bottom: 0px;width:100%;">
...
</table>
</div>
So what is wrong ?
You need to add the styles in your css. scrollbar-primary isn't a bootstrap css class style.
As shown on the page, they created the scrollbar-primary css class style.
.scrollbar {
margin-left: 30px;
float: left;
height: 300px;
width: 65px;
background: #fff;
overflow-y: scroll;
margin-bottom: 25px;
}
.scrollbar-primary::-webkit-scrollbar {
width: 12px;
background-color: #F5F5F5;
}
.scrollbar-primary::-webkit-scrollbar-thumb {
border-radius: 10px;
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.1);
background-color: #4285F4;
}
I want to have an image next to my header. But the thing is that I want this image fixed with position:relative.
Yet, when I fixed the image, it is making a big space between the image and my title.
<h1 id="htitre"><img src="title.png"/> title </h1>
CSS:
h1
{
color: rgb(114, 159, 207);
padding-bottom: 3px;
border-bottom: 5px solid rgb(114, 159, 207);
padding-left:0.3cm;
margin-left: 0.9cm;
}
#htitle img
{
position: relative;
top: 0.15cm;
right:1.5cm;
border: 1px
}
How could I prevent the image from moving my title ?
Do you want something like this? https://jsfiddle.net/o2mxesua/1/
If that's what you want, all you need to do is to replace your h1 by span because h1 takes the entire row width and then assign the font size and weight properties to your span class in whatever way you want.
Here is your updated code -
HTML
<div>
<img src="title.png"/>
<span id="htitle">
title
</span>
</div>
CSS
#htitle
{
color: rgb(114, 159, 207);
padding-bottom: 3px;
border-bottom: 5px solid rgb(114, 159, 207);
padding-left:0.3cm;
margin-left: 0.9cm;
font-size: 4em;
}
#htitle img
{
position: relative;
top: 0.15cm;
right:1.5cm;
border: 1px;
}
We are using Keyoti Spell Cheker in our web application and its working fine with Zk but I have to add NoSpell checking for Datebox so I have to add the following line in my code:
<zk xmlns:x="xhtml" xmlns:zk="zk" xmlns:d="http://www.zkoss.org/2005/zk/client/attribute">
And in component I have to add an attribute like this: d:nospell='true'
It's working fine for textbox and intbox but not for datebox. I have added it like this:
<datebox d:nospell='true'></datebox>
But the spell checker is still doing spell checking in the datebox component so I just inspected the element and the HTML code looks like this:
<i id="t_3475" class="z-datebox" nospell="true"><iframe id="t_3475-real_IF" scrolling="yes" frameborder="0" src="http://localhost:7080/module-web/core/a.rapidspellweb?t=r&n=blank.html" style="display: none; overflow-x: hidden; overflow-y: scroll; border-width: 1px; border-color: rgb(171, 173, 179) rgb(227, 233, 239) rgb(227, 233, 239); border-style: solid; height: 19px; width: 86px; background: none repeat scroll 0% 0% rgb(255, 255, 255); animation-delay: 0s; animation-direction: normal; animation-duration: 0s; animation-fill-mode: none; animation-iteration-count: 1; animation-name: none; animation-play-state: running; box-shadow: none; caption-side: top; clear: none; color: rgb(0, 0, 0); content: none; counter-increment: none; cursor: text; direction: ltr; empty-cells: show; align-self: stretch; flex: 0 1 auto; flex-direction: row; order: 0; justify-content: flex-start; font-family: arial,sans-serif; font-size: 12px; font-size-adjust: none; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: 400; ime-mode: auto; letter-spacing: normal; list-style: disc outside none; opacity: 1; padding: 2px; page-break-after: auto; page-break-before: auto; page-break-inside: auto; pointer-events: auto; quotes: "“" "”" "‘" "’"; transform: none; transform-origin: 50% 50% 0px; perspective-origin: 50% 50%; perspective: none; backface-visibility: visible; transition-delay: 0s; transition-duration: 0s; transition-property: all; unicode-bidi: normal; vertical-align: baseline; color-interpolation: srgb; color-interpolation-filters: linearrgb; fill: rgb(0, 0, 0); fill-opacity: 1; fill-rule: nonzero; filter: none; flood-color: rgb(0, 0, 0); flood-opacity: 1; image-rendering: auto; lighting-color: rgb(255, 255, 255); marker: none; mask: none; shape-rendering: auto; stop-color: rgb(0, 0, 0); stop-opacity: 1; stroke: none; stroke-dasharray: none; stroke-linecap: butt; stroke-linejoin: miter; stroke-miterlimit: 4; stroke-opacity: 1; stroke-width: 1px; vector-effect: none;" tabindex="null"></iframe><input id="t_3475-real" class="z-datebox-inp" type="text" size="11" value="" autocomplete="off" style="display: none;" oldvalue="2013-08-13"></input>
How can we fix this issue so that we can disable spell checking on datebox components?