Skip to content

Commit

Permalink
chore: revert change of replacing invalid css (#1831)
Browse files Browse the repository at this point in the history
* chore: revert change of replacing invalid css

* fix: css test
  • Loading branch information
wre232114 authored Oct 17, 2024
1 parent d7cff30 commit 663dfee
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 12 deletions.
5 changes: 5 additions & 0 deletions .changeset/late-starfishes-help.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@farmfe/core": patch
---

Revert change of replacing invalid css
2 changes: 1 addition & 1 deletion crates/core/src/cache/cache_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use std::{

use crate::config::Mode;

const FARM_CACHE_VERSION: &str = "0.4.8";
const FARM_CACHE_VERSION: &str = "0.4.9";
const FARM_CACHE_MANIFEST_FILE: &str = "farm-cache.json";

// TODO make CacheStore a trait and implement DiskCacheStore or RemoteCacheStore or more.
Expand Down
2 changes: 1 addition & 1 deletion crates/plugin_css/tests/fixtures/analyze_deps/basic.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ div {

p {
background: url('@/img/logo.png');
top: -8px/2 + 1;
/* top: -8px/2 + 1; */
}

.home {filter: progid:DXImageTransform.Microsoft.Alpha(opacity=20)}
6 changes: 3 additions & 3 deletions crates/toolkit/src/css/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ pub fn parse_css_stylesheet(
content = regex
.replace_all(&content, "filter:\"$1.Microsoft.$2\"$3")
.to_string();
// 3. replace invalid operator, eg: top: -8px/2 + 1 to top: "-8px/2 + 1" using regex. fix #1748
let regex = Regex::new(r#":\s*([^;{}]*?\d\s(?:\+|-|\*|/)\s\d[^;{}]*?)\s*(;|\})"#).unwrap();
content = regex.replace_all(&content, ":\"$1\"$2").to_string();
// // 3. replace invalid operator, eg: top: -8px/2 + 1 to top: "-8px/2 + 1" using regex. fix #1748
// let regex = Regex::new(r#":\s*([^;{}]*?\d\s+\s\d[^;{}]*?)\s*(;|\})"#).unwrap();
// content = regex.replace_all(&content, ":\"$1\"$2").to_string();

let (cm, source_file) = create_swc_source_map(Source {
path: PathBuf::from(id),
Expand Down
2 changes: 1 addition & 1 deletion examples/tailwind/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const App = () => {
Edit <code>src/App.tsx</code> and save to reload.
</p>
<a
className="text-blue-300"
className="text-blue-300 shadow"
href="https://github.com/tailwindcss/tailwindcss"
target="_blank"
rel="noopener noreferrer"
Expand Down
12 changes: 6 additions & 6 deletions examples/vite-adapter-vue/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<img src="/logo.png" alt="">
<test />

<TinyButton type="primary" @click="btnClick">
<!-- <TinyButton type="primary" @click="btnClick">
Tiny Vue Modal 最大化显示
</TinyButton>
</TinyButton> -->

<test1 />
<aboute />
Expand All @@ -15,11 +15,11 @@
</template>

<script lang="ts" setup>
import { Button as TinyButton, Modal } from '@opentiny/vue'
// import { Button as TinyButton, Modal } from '@opentiny/vue'
function btnClick() {
Modal.alert({ message: '最大化显示', fullscreen: true })
}
// function btnClick() {
// Modal.alert({ message: '最大化显示', fullscreen: true })
// }
import test1 from './components/test1.vue';
import test from './components/test.vue';
Expand Down

0 comments on commit 663dfee

Please sign in to comment.