Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/fwf 3920 css variable fetcher utility #350

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading