File tree Expand file tree Collapse file tree
packages/vuetify/src/components/VTimeline Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2121 background-color : transparent !important
2222
2323 .v-timeline
24+ --v-timeline-dot-border-size : #{map .get ($timeline-dot-border-sizes , ' default' )}
25+
2426 display : grid
2527 grid-auto-flow : dense
2628 position : relative
208210 $size : $timeline-dot-size + (8 * $multiplier )
209211
210212 & --size- #{$name}
213+ --v-timeline-dot-border-size : #{map .get ($timeline-dot-border-sizes , $name )}
211214 height : $size
212215 width : $size
213216
214- .v-timeline-divider__inner-dot
215- height : calc(100% - #{map .get ($timeline-dot-border-sizes , $name )})
216- width : calc(100% - #{map .get ($timeline-dot-border-sizes , $name )})
217-
218217 .v-timeline-divider__inner-dot
219218 align-items : center
220219 border-radius : $timeline-dot-border-radius
221220 display : flex
222221 justify-content : center
222+ height : calc(100% - var(-- v- timelin e- dot- border- size))
223+ width : calc(100% - var(-- v- timelin e- dot- border- size))
223224
224225 /* * Modifiers **/
225226
Original file line number Diff line number Diff line change @@ -171,5 +171,39 @@ describe('VTimeline', () => {
171171 } )
172172 } )
173173
174+ it ( 'should not fill dot when size is a number and fill-dot is false' , async ( ) => {
175+ render ( ( ) => (
176+ < VTimeline >
177+ < VTimelineItem size = { 40 } fillDot = { false } >
178+ { { default : ( ) => 'Content' } }
179+ </ VTimelineItem >
180+ </ VTimeline >
181+ ) )
182+
183+ const outerDot = screen . getByCSS ( '.v-timeline-divider__dot' )
184+ const innerDot = screen . getByCSS ( '.v-timeline-divider__inner-dot' )
185+
186+ expect ( outerDot . getBoundingClientRect ( ) . width ) . toBe ( 40 )
187+ expect ( innerDot . getBoundingClientRect ( ) . width ) . toBe ( 32 )
188+ expect ( innerDot . getBoundingClientRect ( ) . height ) . toBe ( 32 )
189+ } )
190+
191+ it ( 'should fill dot when size is a number and fill-dot is true' , async ( ) => {
192+ render ( ( ) => (
193+ < VTimeline >
194+ < VTimelineItem size = { 40 } fillDot >
195+ { { default : ( ) => 'Content' } }
196+ </ VTimelineItem >
197+ </ VTimeline >
198+ ) )
199+
200+ const outerDot = screen . getByCSS ( '.v-timeline-divider__dot' )
201+ const innerDot = screen . getByCSS ( '.v-timeline-divider__inner-dot' )
202+
203+ expect ( outerDot . getBoundingClientRect ( ) . width ) . toBe ( 40 )
204+ expect ( innerDot . getBoundingClientRect ( ) . width ) . toBe ( 40 )
205+ expect ( innerDot . getBoundingClientRect ( ) . height ) . toBe ( 40 )
206+ } )
207+
174208 showcase ( { stories } )
175209} )
You can’t perform that action at this time.
0 commit comments