Skip to content

Commit

Permalink
Merge pull request #350 from Ajay-aot/feature/FWF-3920-css-fetcher-ut…
Browse files Browse the repository at this point in the history
…ility

Feature/fwf 3920 css variable fetcher utility
  • Loading branch information
arun-s-aot authored Nov 25, 2024
2 parents eea77a9 + 051783d commit 83182c9
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 1 deletion.
3 changes: 2 additions & 1 deletion forms-flow-service/src/formsflow-services.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ import StorageService from "./storage/storageService";
import RequestService from "./request/requestService";
import i18nService from "./resourceBundles/i18n";
import HelperServices from "./helpers/helperServices";
import StyleServices from "./helpers/styleService"

export { KeycloakService, StorageService, RequestService, i18nService, HelperServices };
export { KeycloakService, StorageService, RequestService, i18nService, HelperServices, StyleServices };
12 changes: 12 additions & 0 deletions forms-flow-service/src/helpers/styleService.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
class StyleServices {
//css variable fetcher utility
public static getCSSVariable(
variableName: string,
element: HTMLElement = document.documentElement
): string {
const value = getComputedStyle(element).getPropertyValue(variableName);
return value.trim();
}
}

export default StyleServices;
7 changes: 7 additions & 0 deletions forms-flow-theme/scss/_card.scss
Original file line number Diff line number Diff line change
Expand Up @@ -201,4 +201,11 @@
color: var(--ff-gray-800);
font-size: var(--font-size-xs);
line-height: var(--text-line-height);
}

.preview-header-text {
color: var(--ff-gray-800);
font-size: var(--font-size-lg);
font-weight: var(--font-weight-xl);
line-height: var(--text-line-height);
}
6 changes: 6 additions & 0 deletions forms-flow-theme/scss/_forms.scss
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,12 @@ select option:hover {
pointer-events: none;
cursor: not-allowed;
}
.form-preview-tab {
padding: var(--spacer-200);
height: 100vh;
overflow-y: auto;
overflow-x: hidden;
}

.dropdown-main {
display: block !important;
Expand Down

0 comments on commit 83182c9

Please sign in to comment.