Very confused because I copy pasted the style from a previous project that works without issue. Using VueJS and the initial app won't properly display the grid-area template. Searched through all the similar questions, not results. Any help is appreciated!
<template>
<div id="app">
<search-bar></search-bar>
<history-cont></history-cont>
<video-view></video-view>
<bookmarks-cont></bookmarks-cont>
</div>
</template>
<script>
import Bookmarks from './components/Bookmarks'
import History from './components/History'
import SearchBar from './components/SearchBar'
import VideoView from './components/VideoView'
export default {
name: 'App',
components: {
'bookmarks-cont': Bookmarks,
'history-cont': History,
'search-bar': SearchBar,
'video-view': VideoView
}
}
</script>
<style>
#app {
display: grid;
grid-template-rows: 55px 1fr;
grid-template-columns: 240px 1fr 240px;
grid-template-areas: "history-cont search-bar bookmarks-cont"
"history-cont video-view bookmarks-cont";
}
</style>
I've also tried replacing the grid-template-areas names with the names of the imported components, but it doesn't work:
grid-template-areas:
"History SearchBar Bookmarks"
"History VideoView Bookmarks"
This worked in my previous app, but following the comments below I did this:
#app {
display: grid;
grid-template-rows: 55px 1fr;
grid-template-columns: 240px 1fr 240px;
grid-template-areas: "history-cont search-bar bookmarks-cont"
"history-cont video-view bookmarks-cont";
}
#app > #search-bar{
grid-area: search-bar;
}
#app > #history-cont{
grid-area: history-cont;
}
#app > #video-view{
grid-area: video-view;
}
#app > #bookmarks-cont{
grid-area: bookmarks-cont;
}
Still doesn't work. Neither does the below:
#app > bookmarks-cont{
grid-area: bookmarks-cont;
}
grid-area: history-cont;