Skip to content

Commit

Permalink
Tocas 4.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
YamiOdymel committed Mar 3, 2023
1 parent 96e915a commit 592e867
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion dist/tocas.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ window.tocas = {
// 如果這個規則開頭有個 @ 符號,就尋找最近的 Container 容器來作為寬度判斷,
// 但如果沒有,就以視窗的 innerWidth 為主。
// @breakpoint
var width = rule.startsWith("@") ? element.closest(`[class~="${tocas.config.scopes.container}"]`).getBoundingClientRect().width : window.innerWidth;
var width = rule.startsWith("@") ? Math.round(element.closest(`[class~="${tocas.config.scopes.container}"]`).getBoundingClientRect().width) : Math.round(window.innerWidth);

return {
min,
Expand Down
2 changes: 1 addition & 1 deletion dist/tocas.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/zh-tw/assets/tocas/src/scripts/tocas.js
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ window.tocas = {
// 如果這個規則開頭有個 @ 符號,就尋找最近的 Container 容器來作為寬度判斷,
// 但如果沒有,就以視窗的 innerWidth 為主。
// @breakpoint
var width = rule.startsWith("@") ? element.closest(`[class~="${tocas.config.scopes.container}"]`).getBoundingClientRect().width : window.innerWidth;
var width = rule.startsWith("@") ? Math.round(element.closest(`[class~="${tocas.config.scopes.container}"]`).getBoundingClientRect().width) : Math.round(window.innerWidth);

return {
min,
Expand Down
2 changes: 1 addition & 1 deletion docs/zh-tw/assets/tocas/tocas.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ window.tocas = {
// 如果這個規則開頭有個 @ 符號,就尋找最近的 Container 容器來作為寬度判斷,
// 但如果沒有,就以視窗的 innerWidth 為主。
// @breakpoint
var width = rule.startsWith("@") ? element.closest(`[class~="${tocas.config.scopes.container}"]`).getBoundingClientRect().width : window.innerWidth;
var width = rule.startsWith("@") ? Math.round(element.closest(`[class~="${tocas.config.scopes.container}"]`).getBoundingClientRect().width) : Math.round(window.innerWidth);

return {
min,
Expand Down
2 changes: 1 addition & 1 deletion docs/zh-tw/assets/tocas/tocas.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tocas",
"version": "4.1.0",
"version": "4.2.0",
"description": "The fastest and most intuitive way to build diverse websites and progressive web application interfaces.",
"directories": {
"doc": "docs",
Expand Down

0 comments on commit 592e867

Please sign in to comment.