Skip to content

Commit

Permalink
improve css loading for content-iframe
Browse files Browse the repository at this point in the history
  • Loading branch information
mubaidr committed Jan 11, 2024
1 parent 5f18df2 commit 93d0ea9
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 5 deletions.
6 changes: 6 additions & 0 deletions src/content-script/iframe/index.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// @config "./tailwind.config.cjs"; // To isolate the styles of the source website and chrome plugin
@import "../../assets/base";

.body {
@apply w-full h-full;
}
2 changes: 1 addition & 1 deletion src/content-script/iframe/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const router = createRouter({

createApp(App).use(router).mount('#app')

console.log(router.getRoutes())
// console.log(router.getRoutes())

self.onerror = function (message, source, lineno, colno, error) {
console.info(
Expand Down
5 changes: 4 additions & 1 deletion src/content-script/iframe/pages/index.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<template>
<div class="text-red font-bold text-xl">Cotnent Script Iframe</div>
<div>
<h1 class="text-red-800 font-bold text-xl">Content Script Iframe</h1>
<button class="btn btn-primary">Sample Daisy UI Button</button>
</div>
</template>

<script setup lang="ts"></script>
Expand Down
18 changes: 18 additions & 0 deletions src/content-script/iframe/tailwind.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/** @type {import('tailwindcss').Config} */
module.exports = {
important: 'crx-iframe',
content: ['./src/**/*.{index,vue,js,ts,jsx,tsx}'],
theme: {
extend: {},
},
plugins: [
'prettier-plugin-tailwindcss',
require('@tailwindcss/typography'),
require('@tailwindcss/forms'),
require('daisyui'),
],
// corePlugins: {
// preflight: false, // Disable this configuration option to prevent Tailwind from interfering with the styles of the source website
// },
// prefix: 'tw-',
}
2 changes: 1 addition & 1 deletion src/options/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const router = createRouter({

createApp(App).use(router).use(createPinia()).mount('#app')

console.log(router.getRoutes())
// console.log(router.getRoutes())

self.onerror = function (message, source, lineno, colno, error) {
console.info(
Expand Down
2 changes: 1 addition & 1 deletion src/popup/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const router = createRouter({

createApp(App).use(router).use(createPinia()).mount('#app')

console.log(router.getRoutes())
// console.log(router.getRoutes())

self.onerror = function (message, source, lineno, colno, error) {
console.info(
Expand Down
2 changes: 1 addition & 1 deletion src/setup/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ app.provide('setupType', { setupType } as ISetup)

app.use(router).mount('#app')

console.log(router.getRoutes())
// console.log(router.getRoutes())

self.onerror = function (message, source, lineno, colno, error) {
console.info(
Expand Down

0 comments on commit 93d0ea9

Please sign in to comment.